summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2004-01-04 17:17:46 +0000
committeriedowse <iedowse@FreeBSD.org>2004-01-04 17:17:46 +0000
commit6fde69b7d17726e5071e0aeb2f166836ab07b949 (patch)
treefdc9b1d00381bd4ca4a8f4f606ffa13e1edf38e4
parentbeec06dbdd5315f8c1228033b63ea4968a4d2fd3 (diff)
downloadFreeBSD-src-6fde69b7d17726e5071e0aeb2f166836ab07b949.zip
FreeBSD-src-6fde69b7d17726e5071e0aeb2f166836ab07b949.tar.gz
Define _PATH_MKSNAP_FFS and use it in dump(8) instead of assuming
that mksnap_ffs(8) can be found using the current $PATH. Reviewed by: mckusick
-rw-r--r--include/paths.h1
-rw-r--r--sbin/dump/main.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/paths.h b/include/paths.h
index 043e61c..55fc21e 100644
--- a/include/paths.h
+++ b/include/paths.h
@@ -71,6 +71,7 @@
#define _PATH_MAN "/usr/share/man"
#define _PATH_MDCONFIG "/sbin/mdconfig"
#define _PATH_MEM "/dev/mem"
+#define _PATH_MKSNAP_FFS "/sbin/mksnap_ffs"
#define _PATH_MOUNT "/sbin/mount"
#define _PATH_NEWFS "/sbin/newfs"
#define _PATH_NOLOGIN "/var/run/nologin"
diff --git a/sbin/dump/main.c b/sbin/dump/main.c
index 432d185..94d4d03 100644
--- a/sbin/dump/main.c
+++ b/sbin/dump/main.c
@@ -321,8 +321,8 @@ main(int argc, char *argv[])
snprintf(snapname, sizeof snapname,
"%s/.snap/dump_snapshot", mntpt);
- snprintf(snapcmd, sizeof snapcmd,
- "mksnap_ffs %s %s", mntpt, snapname);
+ snprintf(snapcmd, sizeof snapcmd, "%s %s %s",
+ _PATH_MKSNAP_FFS, mntpt, snapname);
unlink(snapname);
if (system(snapcmd) != 0)
errx(X_STARTUP, "Cannot create %s: %s\n",
OpenPOWER on IntegriCloud