diff options
author | brooks <brooks@FreeBSD.org> | 2013-02-20 15:18:42 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2013-02-20 15:18:42 +0000 |
commit | dabbf96e6dc93cae3d712c967b8297077e85c14c (patch) | |
tree | ed5d5cf77512085eba9acb0eb702d6efa2b649fa /usr.sbin/makefs/mtree.c | |
parent | c00d15a4dde2c54b90438648342d1c185b81b1c3 (diff) | |
download | FreeBSD-src-dabbf96e6dc93cae3d712c967b8297077e85c14c.zip FreeBSD-src-dabbf96e6dc93cae3d712c967b8297077e85c14c.tar.gz |
Add a -D flag that causes duplicate entries in an mtree manifest to be
treated as warnings rather than errors.
Reviewed by: marcel
Sponsored by: DARPA, AFRL
Diffstat (limited to 'usr.sbin/makefs/mtree.c')
-rw-r--r-- | usr.sbin/makefs/mtree.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index 836e766..f5eb5fc 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -881,8 +881,14 @@ read_mtree_spec1(FILE *fp, bool def, const char *name) if (strcmp(name, node->name) == 0) { if (def == true) { - mtree_error("duplicate definition of %s", - name); + if (!dupsok) + mtree_error( + "duplicate definition of %s", + name); + else + mtree_warning( + "duplicate definition of %s", + name); return (0); } |