If rawname returns NULL, deal with it appropriately.
PR: 94045 Submitted by: Andrey Elsukov MFC after: 1 week
This commit is contained in:
parent
57d6c87c0e
commit
90bdcf6bdc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161333
@ -312,6 +312,8 @@ main(int argc, char *argv[])
|
||||
dt = fstabsearch(disk);
|
||||
if (dt != NULL) {
|
||||
disk = rawname(dt->fs_spec);
|
||||
if (disk == NULL)
|
||||
errx(X_STARTUP, "%s: unknown file system", dt->fs_spec);
|
||||
(void)strncpy(spcl.c_dev, dt->fs_spec, NAMELEN);
|
||||
(void)strncpy(spcl.c_filesys, dt->fs_file, NAMELEN);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user