Module Name: src Committed By: tkusumi Date: Thu Feb 29 08:13:52 UTC 2024
Modified Files: src/usr.sbin/makefs: msdos.c Log Message: makefs/msdos: Fix broken [extra-directory ...] case "path + cur->name" is not same as "cur->root + cur->path + cur->name" for extra-directory files, as extra-directory files are in different location. Do what makefs ffs code does. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/makefs/msdos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/makefs/msdos.c diff -u src/usr.sbin/makefs/msdos.c:1.24 src/usr.sbin/makefs/msdos.c:1.25 --- src/usr.sbin/makefs/msdos.c:1.24 Sun Feb 18 16:58:51 2024 +++ src/usr.sbin/makefs/msdos.c Thu Feb 29 08:13:52 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msdos.c,v 1.24 2024/02/18 16:58:51 christos Exp $ */ +/* $NetBSD: msdos.c,v 1.25 2024/02/29 08:13:52 tkusumi Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(__lint) -__RCSID("$NetBSD: msdos.c,v 1.24 2024/02/18 16:58:51 christos Exp $"); +__RCSID("$NetBSD: msdos.c,v 1.25 2024/02/29 08:13:52 tkusumi Exp $"); #endif /* !__lint */ #include <sys/param.h> @@ -226,8 +226,8 @@ msdos_populate_dir(const char *path, str assert(fsopts != NULL); for (cur = root->next; cur != NULL; cur = cur->next) { - if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s", path, - cur->name) >= sizeof(pbuf)) { + if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s/%s", + cur->root, cur->path, cur->name) >= sizeof(pbuf)) { warnx("path %s too long", pbuf); return -1; }