Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions host_applications/linux/apps/gencmd/gencmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ void show_usage()
puts( "Send a command to the VideoCore and print the result.\n" );
puts( " -t Time how long the command takes to complete" );
puts( " -h, --help Show this information\n" );
puts( "Use the command 'vcgencmd commands' to get a list of available commands\n" );
puts( "Exit status:" );
puts( " 0 command completed successfully" );
puts( " -1 problem with VCHI" );
puts( " -2 VideoCore returned an error\n" );
puts( "For further documentation please see" );
puts( "For further documentation see the manual ('man vcgencmd') - or" );
puts( "https://www.raspberrypi.org/documentation/raspbian/applications/vcgencmd.md\n" );
}

Expand Down Expand Up @@ -148,10 +147,10 @@ int main( int argc, char **argv )
{
if (strncmp( buffer, "error=", 6) == 0 )
{
fprintf (stderr, "%s\n", buffer);
fprintf (stderr, "%s\n\n", buffer);
if ( strcmp( buffer, "error=1 error_msg=\"Command not registered\"" ) == 0 )
{
fprintf( stderr, "Use 'vcgencmd commands' to get a list of commands\n" );
show_usage();
}
return -2;
}
Expand Down