main.c (122787) | main.c (124132) |
---|---|
1/*- 2 * Copyright (c) 1980, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; 43#endif 44static const char rcsid[] = | 1/*- 2 * Copyright (c) 1980, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; 43#endif 44static const char rcsid[] = |
45 "$FreeBSD: head/sbin/dump/main.c 122787 2003-11-16 08:01:58Z mckusick $"; | 45 "$FreeBSD: head/sbin/dump/main.c 124132 2004-01-04 17:17:46Z iedowse $"; |
46#endif /* not lint */ 47 48#include <sys/param.h> 49#include <sys/stat.h> 50#include <sys/time.h> 51#include <sys/mount.h> 52#include <sys/disklabel.h> 53 --- 262 unchanged lines hidden (view full) --- 316 if (snapdump == 0) { 317 msg("WARNING: %s\n", 318 "should use -L when dumping live filesystems!"); 319 } else { 320 char snapname[BUFSIZ], snapcmd[BUFSIZ]; 321 322 snprintf(snapname, sizeof snapname, 323 "%s/.snap/dump_snapshot", mntpt); | 46#endif /* not lint */ 47 48#include <sys/param.h> 49#include <sys/stat.h> 50#include <sys/time.h> 51#include <sys/mount.h> 52#include <sys/disklabel.h> 53 --- 262 unchanged lines hidden (view full) --- 316 if (snapdump == 0) { 317 msg("WARNING: %s\n", 318 "should use -L when dumping live filesystems!"); 319 } else { 320 char snapname[BUFSIZ], snapcmd[BUFSIZ]; 321 322 snprintf(snapname, sizeof snapname, 323 "%s/.snap/dump_snapshot", mntpt); |
324 snprintf(snapcmd, sizeof snapcmd, 325 "mksnap_ffs %s %s", mntpt, snapname); | 324 snprintf(snapcmd, sizeof snapcmd, "%s %s %s", 325 _PATH_MKSNAP_FFS, mntpt, snapname); |
326 unlink(snapname); 327 if (system(snapcmd) != 0) 328 errx(X_STARTUP, "Cannot create %s: %s\n", 329 snapname, strerror(errno)); 330 if ((diskfd = open(snapname, O_RDONLY)) < 0) { 331 unlink(snapname); 332 errx(X_STARTUP, "Cannot open %s: %s\n", 333 snapname, strerror(errno)); --- 398 unchanged lines hidden --- | 326 unlink(snapname); 327 if (system(snapcmd) != 0) 328 errx(X_STARTUP, "Cannot create %s: %s\n", 329 snapname, strerror(errno)); 330 if ((diskfd = open(snapname, O_RDONLY)) < 0) { 331 unlink(snapname); 332 errx(X_STARTUP, "Cannot open %s: %s\n", 333 snapname, strerror(errno)); --- 398 unchanged lines hidden --- |