--- ufs_copy.c.orig 2006-09-21 15:28:09.000000000 +0900 +++ ufs_copy.c 2007-12-27 23:28:55.000000000 +0900 @@ -111,9 +111,11 @@ main(int argc, char *argv[]) { struct fstab *fs; - int ch, eval=0; + int ch, eval=0, md; char *snapshot = NULL; - char *src, *dst; + char *src, *dst, *snap = NULL; + char mddev[256]; + FILE *readp; #ifdef USEMMAP while ((ch = getopt(argc, argv, "aBb:ceMms:v")) != -1) @@ -174,6 +176,21 @@ eval = system(buf); if (eval) errx(eval, "mksnap_ffs failed"); + + snprintf(buf, sizeof(buf), + "/sbin/mdconfig -a -n -t vnode -f %s", src); + fprintf(stderr, "%s\n", buf); + readp = popen(buf, "r"); + if (readp == NULL) + errx(eval, "mdconfig failed"); + eval = fscanf(readp, "%d", &md); + if (eval != 1) + errx(eval, "mdconfig failed"); + pclose(readp); + snprintf(mddev, sizeof(mddev), "/dev/md%d", md); + snap = src; + src = mddev; + fprintf(stderr, "attached %s as memory disk %s\n", snap, mddev); } if ((fs = getfsfile(src)) == NULL) { @@ -188,9 +205,19 @@ } if (snapshot) { - fprintf(stderr, "removing snapshot file %s ... ", src); + char buf[1024]; + + snprintf(buf, sizeof(buf), + "/sbin/mdconfig -d -u %d", md); + fprintf(stderr, "%s\n", buf); + eval = system(buf); + if (eval) + errx(eval, "mdconfig failed"); + fprintf(stderr, "detached memory disk %s\n", mddev); + + fprintf(stderr, "removing snapshot file %s ... ", snap); fflush(stderr); - if (unlink(src) == 0) + if (unlink(snap) == 0) fprintf(stderr, "done\n"); else fprintf(stderr, "failed\n"); .3'>dependabot/npm_and_yarn/devel/electron4/files/elliptic-6.5.3 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/rogue_s
Commit message (Expand)AuthorAgeFilesLines
* - Fix trailing whitespace in pkg-descrs, categories [g-n]*amdmi32016-05-191-1/+1
* Remove ${PORTSDIR}/ from dependencies, categories h, i, j, k, and l.mat2016-04-011-1/+1
* MASTER_SITES cleanup.mat2015-05-141-6/+2
* japanese/rogue_s: support stagewg2014-08-081-24/+12
* Resetting maintainership on ports that have not been staged and without anyantoine2014-07-031-1/+1
* Fix build on 10.X and later.hrs2013-11-301-0/+539
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-5/+2
* Remove more tags from pkg-descr files fo the form:dougb2011-10-241-3/+0
* - Get Rid MD5 supportmiwi2011-03-191-5/+0
* - Update to maintainer mail adressmiwi2009-01-161-1/+1
* - respect NOPORTDOCS and NOPORTDATAitetcu2008-06-301-0/+92
* - respect NOPORTDOCS and NOPORTDATAitetcu2008-06-304-121/+28