From dde2030cda5fd1cd8408b6bfa18a37920b3c5bcf Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Tue, 12 Jan 2021 11:07:34 +0300 Subject: [PATCH] cdba: allow specifying symlink as a boot file cdba will choke with 'is not a regular file' message if one specifies symlink as a boot file argument. Support using symlinks as a boot file. Signed-off-by: Dmitry Baryshkov --- cdba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdba.c b/cdba.c index 0d8bf56..c8acaf8 100644 --- a/cdba.c +++ b/cdba.c @@ -660,7 +660,7 @@ int main(int argc, char **argv) fastboot_file = argv[optind]; if (lstat(fastboot_file, &sb)) err(1, "unable to read \"%s\"", fastboot_file); - if (!S_ISREG(sb.st_mode)) + if (!S_ISREG(sb.st_mode) && !S_ISLNK(sb.st_mode)) errx(1, "\"%s\" is not a regular file", fastboot_file); request_select_board(board);