From 80c76b58f67b58592a90596619519509b06a8b6f Mon Sep 17 00:00:00 2001 From: fjoe Date: Wed, 11 May 2005 17:02:38 +0000 Subject: - check for geom_uzip module presence using kldstat -m. kldstat -m finds geom_uzip module even if it is compiled in statically. - create output file with x bit set. - build mkuzip on all architectures (verified with "make universe"). - fix typo in info message. --- usr.bin/Makefile | 4 +--- usr.bin/mkuzip/mkuzip.c | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index ef5d7db..648a42f 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -116,7 +116,7 @@ SUBDIR= alias \ mklocale \ mkstr \ mktemp \ - ${_mkuzip} \ + mkuzip \ msgs \ mt \ ${_nc} \ @@ -287,7 +287,6 @@ _usbhidctl= usbhidctl .endif .if ${MACHINE_ARCH} == "i386" -_mkuzip= mkuzip _ncplist= ncplist _ncplogin= ncplogin _smbutil= smbutil @@ -298,7 +297,6 @@ _uac= uac .endif .if ${MACHINE_ARCH} == "amd64" -_mkuzip= mkuzip _ncplist= ncplist _ncplogin= ncplogin _smbutil= smbutil diff --git a/usr.bin/mkuzip/mkuzip.c b/usr.bin/mkuzip/mkuzip.c index d29e639..2f770ff 100644 --- a/usr.bin/mkuzip/mkuzip.c +++ b/usr.bin/mkuzip/mkuzip.c @@ -30,7 +30,7 @@ #define CLOOP_MAGIC_LEN 128 static char CLOOP_MAGIC_START[] = "#!/bin/sh\n#V2.0 Format\n" - "m=geom_uzip\n(kldstat -n $m 2>&-||kldload $m)>&-&&" + "m=geom_uzip\n(kldstat -m $m 2>&-||kldload $m)>&-&&" "mount_cd9660 /dev/`mdconfig -af $0`.uzip $1\nexit $?\n"; static char *readblock(int, char *, u_int32_t); @@ -141,7 +141,7 @@ int main(int argc, char **argv) /* Not reached */ } fdw = open(oname, O_WRONLY | O_TRUNC | O_CREAT, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); + S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); if (fdw < 0) { err(1, "%s", oname); /* Not reached */ @@ -160,7 +160,7 @@ int main(int argc, char **argv) if (verbose != 0) fprintf(stderr, "data size %ju bytes, number of clusters " - "%u, index lengh %zu bytes\n", sb.st_size, + "%u, index length %zu bytes\n", sb.st_size, hdr.nblocks, iov[1].iov_len); for(i = 0; i == 0 || ibuf != NULL; i++) { -- cgit v1.1