aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2003-12-05 09:36:56 +0000
committerIan Dowse <iedowse@FreeBSD.org>2003-12-05 09:36:56 +0000
commit05779418cd12f1edec6fd65c49cd1ef94592e679 (patch)
tree3c31e6609e99d96dc8b6d4578f3129a4d9ffc00a /sbin/mount
parent85b366ad69d301de23ec0c6823dce9c3e525b60d (diff)
Notes
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mount.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 40478cb35ae07..ff4fb8c2b7849 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -292,8 +292,8 @@ main(argc, argv)
* ':' will be correctly parsed only if the separator is '@'.
* The definition of a valid hostname is taken from RFC 1034.
*/
- if (vfslist == NULL && ((ep = strchr(argv[0], '@')) != NULL) ||
- ((ep = strchr(argv[0], ':')) != NULL)) {
+ if (vfslist == NULL && ((ep = strchr(argv[0], '@')) != NULL ||
+ (ep = strchr(argv[0], ':')) != NULL)) {
if (*ep == '@') {
cp = ep + 1;
ep = cp + strlen(cp);
@@ -393,8 +393,7 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
const char *vfstype, *spec, *name, *options, *mntopts;
int flags;
{
- const char *argv[100], **edir;
- char *path, *cur;
+ const char *argv[100];
struct statfs sf;
pid_t pid;
int argc, i, status;
@@ -468,7 +467,8 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
(void)snprintf(execname, sizeof(execname), "mount_%s", vfstype);
execvP(execname, _PATH_SYSPATH, (char * const *)argv);
if (errno == ENOENT) {
- warn("exec mount_%s not found in %s", vfstype, path);
+ warn("exec mount_%s not found in %s", vfstype,
+ _PATH_SYSPATH);
}
exit(1);
/* NOTREACHED */
@@ -531,13 +531,15 @@ prmount(sfp)
if (verbose) {
if (sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0)
(void)printf(", writes: sync %ld async %ld",
- sfp->f_syncwrites, sfp->f_asyncwrites);
+ (long)sfp->f_syncwrites, (long)sfp->f_asyncwrites);
if (sfp->f_syncreads != 0 || sfp->f_asyncreads != 0)
(void)printf(", reads: sync %ld async %ld",
- sfp->f_syncreads, sfp->f_asyncreads);
- printf(", fsid ");
- for (i = 0; i < sizeof(sfp->f_fsid); i++)
- printf("%02x", ((u_char *)&sfp->f_fsid)[i]);
+ (long)sfp->f_syncreads, (long)sfp->f_asyncreads);
+ if (sfp->f_fsid.val[0] != 0 || sfp->f_fsid.val[1] != 0) {
+ printf(", fsid ");
+ for (i = 0; i < sizeof(sfp->f_fsid); i++)
+ printf("%02x", ((u_char *)&sfp->f_fsid)[i]);
+ }
}
(void)printf(")\n");
}