Make sure we don't pass garbage to the kernel.

The filesystem is named "ufs" not "ffs".
This commit is contained in:
Poul-Henning Kamp 2004-12-08 11:54:50 +00:00
parent 8f25bad356
commit b697270ad8

View File

@ -66,6 +66,7 @@ main(int argc, char **argv)
usage();
dir = argv[1];
memset(&args, 0, sizeof args);
args.fspec = argv[2];
/*
@ -103,7 +104,7 @@ main(int argc, char **argv)
*/
if ((grp = getgrnam("operator")) == NULL)
errx(1, "Cannot retrieve operator gid");
if (mount("ffs", dir, MNT_UPDATE | MNT_SNAPSHOT | stfsbuf.f_flags,
if (mount("ufs", dir, MNT_UPDATE | MNT_SNAPSHOT | stfsbuf.f_flags,
&args) < 0)
err(1, "Cannot create %s", args.fspec);
if ((fd = open(args.fspec, O_RDONLY)) < 0)