29 #include <sys/types.h>    36 #include "rnr/rnrconfig.h"    70   "Destroy GPIO exported interface.",
    73   "The %P command destroys a GPIO exported interface for the specified GPIO "    75   "NOTE: This command requires root privileges.",
    89 static int strToInt(
const string &str, 
int &val)
    93   if( sscanf(str.c_str(), 
"%lli", &val1) != 1 )
   115   Argv0 = basename(argv[0]);
   122     fprintf(stderr, 
"%s: No GPIO pin number <gpio> specified.\n", 
Argv0);
   123     fprintf(stderr, 
"Try '%s --help' for more information.\n", 
Argv0);
   127   else if( strToInt(argv[0], 
ArgsGpio) < 0 )
   129     fprintf(stderr, 
"%s: '%s': Bad GPIO number.\n", 
Argv0, argv[0]);
   130     fprintf(stderr, 
"Try '%s --help' for more information.\n", 
Argv0);
   143 int main(
int argc, 
char* argv[])
 static OptsPgmInfo_T PgmInfo
Program information. 
int main(int argc, char *argv[])
Main. 
GPIO interface declarations and defines. 
#define APP_EC_EXEC
execution exit code 
static void mainInit(int argc, char *argv[])
Main initialization. 
int gpioUnexport(int gpio)
Unexport (delete) a GPIO interface. 
static OptsInfo_T OptsInfo[]
Command line options information. 
static const PkgInfo_T PkgInfo
Package version information. 
#define APP_EC_OK
success exit code 
static char * Argv0
the command 
static int ArgsGpio
gpio number 
#define APP_EC_ARGS
command-line options/arguments error exit code