mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
makefs: Handle missing link keyword in mtree spec
PR: 241178 Reviewed by: emaste MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/850
This commit is contained in:
parent
2303980cfc
commit
d26c1a0f8b
1 changed files with 4 additions and 1 deletions
|
|
@ -740,7 +740,10 @@ read_mtree_keywords(FILE *fp, fsnode *node)
|
|||
type = S_IFREG;
|
||||
} else if (node->type != 0) {
|
||||
type = node->type;
|
||||
if (type == S_IFREG) {
|
||||
if (type == S_IFLNK && node->symlink == NULL) {
|
||||
mtree_error("%s: link type requires link keyword", node->name);
|
||||
return (0);
|
||||
} else if (type == S_IFREG) {
|
||||
/* the named path is the default contents */
|
||||
node->contents = mtree_file_path(node);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue