diff options
Diffstat (limited to 'futility/cmd_sign.c')
-rw-r--r-- | futility/cmd_sign.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/futility/cmd_sign.c b/futility/cmd_sign.c index f256b00e..a960abd6 100644 --- a/futility/cmd_sign.c +++ b/futility/cmd_sign.c @@ -18,6 +18,7 @@ #include <unistd.h> #include "bmpblk_header.h" +#include "file_type.h" #include "fmap.h" #include "futility.h" #include "gbb_header.h" @@ -889,7 +890,10 @@ static int do_sign(int argc, char *argv[]) } /* What are we looking at? */ - type = futil_what_file_type(infile); + if (futil_file_type(infile, &type)) { + errorcnt++; + goto done; + } /* We may be able to infer the type based on the other args */ if (type == FILE_TYPE_UNKNOWN) { @@ -900,7 +904,7 @@ static int do_sign(int argc, char *argv[]) type = FILE_TYPE_RAW_FIRMWARE; } - Debug("type=%s\n", futil_file_type_str[type]); + Debug("type=%s\n", futil_file_type_str(type)); /* Check the arguments for the type of thing we want to sign */ switch (type) { @@ -972,6 +976,11 @@ static int do_sign(int argc, char *argv[]) errorcnt += no_opt_if(!option.config_data, "config"); errorcnt += no_opt_if(option.arch == ARCH_UNSPECIFIED, "arch"); break; + case FILE_TYPE_CHROMIUMOS_DISK: + fprintf(stderr, "Signing a %s is not yet supported\n", + futil_file_type_str(type)); + errorcnt++; + break; default: DIE; } |