diff options
author | imp <imp@FreeBSD.org> | 2008-11-29 02:28:05 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2008-11-29 02:28:05 +0000 |
commit | 85bc384554a99df3b864546d182e37b71fa7b881 (patch) | |
tree | f0db65c117ca7946c24dbbb784628a972b80b8a9 /sbin/mount_msdosfs | |
parent | 57874580d381e7e0d4e60e7461115b540f36a803 (diff) | |
download | FreeBSD-src-85bc384554a99df3b864546d182e37b71fa7b881.zip FreeBSD-src-85bc384554a99df3b864546d182e37b71fa7b881.tar.gz |
Noticed the following error message:
mount_msdosfs: /dev/cf0s1: : Operation not supported by device
and thought I'd fix it to be:
mount_msdosfs: /dev/cf0s1: Operation not supported by device
Not sure why errmsg isn't getting filled in, or why this error is even
happening at all... (fsck_msdosfs is clean, and I can mount this same
CF elsewhere).
Diffstat (limited to 'sbin/mount_msdosfs')
-rw-r--r-- | sbin/mount_msdosfs/mount_msdosfs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/mount_msdosfs/mount_msdosfs.c b/sbin/mount_msdosfs/mount_msdosfs.c index 8947644..096f04a 100644 --- a/sbin/mount_msdosfs/mount_msdosfs.c +++ b/sbin/mount_msdosfs/mount_msdosfs.c @@ -218,8 +218,12 @@ main(int argc, char **argv) build_iovec_argf(&iov, &iovlen, "mask", "%u", mask); build_iovec_argf(&iov, &iovlen, "dirmask", "%u", dirmask); - if (nmount(iov, iovlen, mntflags) < 0) - err(1, "%s: %s", dev, errmsg); + if (nmount(iov, iovlen, mntflags) < 0) { + if (errmsg[0]) + err(1, "%s: %s", dev, errmsg); + else + err(1, "%s", dev); + } exit (0); } |