File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2774,19 +2774,21 @@ static int process_args(int argc, char** argv) {
27742774#ifdef DEBUG_SIGNTOOL
27752775 printf (" (#%d is not a setting, abort processing of remaining %d args as settings)\n" , i , argc - i );
27762776#endif
2777- if (i == (argc - 3 )) {
2777+ if ((i == (argc - 3 )) || (i == (argc - 4 )))
2778+ {
27782779 /* Looks like we have good parameters */
27792780#ifdef DEBUG_SIGNTOOL
27802781 printf ("Detected positional arguments.\n" );
27812782 printf ("Using:\n" );
27822783 printf (" Image: %s\n" , argv [i + 0 ]);
27832784 printf (" Key: %s\n" , argv [i + 1 ]);
27842785 printf (" Version: %s\n" , argv [i + 2 ]);
2786+ printf (" Output: %s\n" , argv [i + 3 ]);
27852787#endif
27862788 }
27872789 else {
2788- printf ("Error: expected exactly 3 positional arguments after options, got %d.\n" , argc );
2789- printf ("Usage: %s [OPTIONS] IMAGE.BIN KEY.DER VERSION\n" , argv [0 ]);
2790+ printf ("Error: expected exactly 3 or 4 positional arguments after options, got %d.\n" , argc - i );
2791+ printf ("Usage: %s [OPTIONS] IMAGE.BIN KEY.DER VERSION [output] \n" , argv [0 ]);
27902792
27912793 exit (1 );
27922794 }
You can’t perform that action at this time.
0 commit comments