- 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.
This commit is contained in:
fjoe 2005-05-11 17:02:38 +00:00
parent 5c5670e57e
commit a640170ed2
2 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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++) {