diff options
| author | Stéphane Rochoy <stephane.rochoy@stormshield.eu> | 2023-09-21 07:14:20 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2023-09-21 16:49:11 +0000 |
| commit | d26c1a0f8bceb6748436fe3fc57bac3ef8179dd3 (patch) | |
| tree | a8eb9a455e879c4b8fc87c44846c11b27f8aea9b /usr.sbin/makefs/mtree.c | |
| parent | 2303980cfcb1e709c17b108ce66a25a8e7eea337 (diff) | |
Diffstat (limited to 'usr.sbin/makefs/mtree.c')
| -rw-r--r-- | usr.sbin/makefs/mtree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index 45588e202542..3e62afbc1137 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -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); } |
