mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
makefs: Handle missing link keyword in mtree spec
PR: 241178 Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/850 (cherry picked from commitd26c1a0f8b
) (cherry picked from commitbe31bd5989
)
This commit is contained in:
parent
d99a15bf6f
commit
d8d0ecd973
|
@ -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