# HG changeset patch # User Pascal Bellard # Date 1603287216 0 # Node ID bd734fc437921edcaf98782a4ff0a50d7ac6b06f # Parent ee961aa986c8b238402b1d0b908b1bcb85c59910 ipxe: add isgt command diff -r ee961aa986c8 -r bd734fc43792 buildroot/receipt --- a/buildroot/receipt Thu Oct 08 16:37:16 2020 +0000 +++ b/buildroot/receipt Wed Oct 21 13:33:36 2020 +0000 @@ -13,7 +13,7 @@ SUGGESTED="subversion bazaar git elfkickers ccache bison flex gettext texinfo" DEPENDS="bash bc bzip2 ncurses ncurses-dev ncursesw-extra patch \ - perl python rsync slitaz-toolchain tar unzip wget" + perl python rsync slitaz-toolchain tar unzip wget pkg-config Qt4-dev" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() @@ -30,6 +30,6 @@ cat < " ); ++ ++/** ++ * "isgt" command ++ * ++ * @v argc Argument count ++ * @v argv Argument list ++ * @ret rc Return status code ++ */ ++static int isgt_exec ( int argc, char **argv ) { ++ struct isgt_options opts; ++ unsigned int a, b; ++ int rc; ++ ++ /* Parse options */ ++ if ( ( rc = parse_options ( argc, argv, &isgt_cmd, &opts ) ) != 0 ) ++ return rc; ++ ++ /* Parse numbers */ ++ if ( ( rc = parse_integer ( argv[optind], &a ) ) != 0 ) ++ return rc; ++ if ( ( rc = parse_integer ( argv[optind + 1], &b ) ) != 0 ) ++ return rc; ++ ++ /* Return success if a is greater than b */ ++ return ( ( a > b ) ? 0 : -ERANGE ); ++} ++ ++/** "isgt" command */ ++struct command isgt_command __command = { ++ .name = "isgt", ++ .exec = isgt_exec, ++}; ++ + /** "sleep" options */ + struct sleep_options {}; +