mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
makefs: Make it possible to silence warnings about duplicate paths
When generating a VM image from an installworld mtree manifest, makefs spits out several thousand warnings about duplicate paths in the manifest. These are harmless and have been around for a long time (see the phabricator revision for some more details), so let's at least have a way to make makefs quieter. Reviewed by: brooks, imp, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43513
This commit is contained in:
parent
2f2da21740
commit
e0deb85065
|
@ -33,7 +33,7 @@
|
||||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd January 2, 2024
|
.Dd January 19, 2024
|
||||||
|
|
||||||
.Dt MAKEFS 8
|
.Dt MAKEFS 8
|
||||||
.Os
|
.Os
|
||||||
|
@ -110,6 +110,8 @@ suffix may be provided to indicate that
|
||||||
indicates a percentage of the calculated image size.
|
indicates a percentage of the calculated image size.
|
||||||
.It Fl D
|
.It Fl D
|
||||||
Treat duplicate paths in an mtree manifest as warnings not error.
|
Treat duplicate paths in an mtree manifest as warnings not error.
|
||||||
|
If this flag is specified more than once, warnings about duplicate paths
|
||||||
|
are not printed at all.
|
||||||
.It Fl d Ar debug-mask
|
.It Fl d Ar debug-mask
|
||||||
Enable various levels of debugging, depending upon which bits are
|
Enable various levels of debugging, depending upon which bits are
|
||||||
set in
|
set in
|
||||||
|
|
|
@ -164,7 +164,7 @@ main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'D':
|
case 'D':
|
||||||
dupsok = 1;
|
dupsok++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
|
|
|
@ -894,11 +894,11 @@ read_mtree_spec1(FILE *fp, bool def, const char *name)
|
||||||
|
|
||||||
if (strcmp(name, node->name) == 0) {
|
if (strcmp(name, node->name) == 0) {
|
||||||
if (def == true) {
|
if (def == true) {
|
||||||
if (!dupsok)
|
if (dupsok == 0)
|
||||||
mtree_error(
|
mtree_error(
|
||||||
"duplicate definition of %s",
|
"duplicate definition of %s",
|
||||||
name);
|
name);
|
||||||
else
|
else if (dupsok == 1)
|
||||||
mtree_warning(
|
mtree_warning(
|
||||||
"duplicate definition of %s",
|
"duplicate definition of %s",
|
||||||
name);
|
name);
|
||||||
|
|
Loading…
Reference in a new issue