RTEMS 6.1-rc1
Macros | Enumerations | Variables
fdisk.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <rtems/bdpart.h>
#include <rtems/error.h>
#include <rtems/shell.h>

Macros

#define RTEMS_BDPART_SHELL_ERROR(fmt, ...)
 
#define RTEMS_BDPART_SHELL_ERROR_SC(sc, fmt, ...)
 

Enumerations

enum  rtems_bdpart_shell_state { RTEMS_BDPART_SHELL_FS , RTEMS_BDPART_SHELL_N , RTEMS_BDPART_SHELL_MBR , RTEMS_BDPART_SHELL_GPT }
 

Variables

struct rtems_shell_cmd_tt rtems_shell_FDISK_Command
 

Detailed Description

Block device partition management.

Macro Definition Documentation

◆ RTEMS_BDPART_SHELL_ERROR

#define RTEMS_BDPART_SHELL_ERROR (   fmt,
  ... 
)
Value:
do { \
printf( "error: " fmt "\n", ##__VA_ARGS__); \
return -1; \
} while (0)

◆ RTEMS_BDPART_SHELL_ERROR_SC

#define RTEMS_BDPART_SHELL_ERROR_SC (   sc,
  fmt,
  ... 
)
Value:
if ((sc) != RTEMS_SUCCESSFUL) { \
printf( "error: " fmt ": %s\n", ##__VA_ARGS__, rtems_status_text( sc)); \
return -1; \
}
const char * rtems_status_text(rtems_status_code status_code)
Maps the status code to a descriptive text.
Definition: statustext.c:76
@ RTEMS_SUCCESSFUL
This status code indicates successful completion of a requested operation.
Definition: status.h:90

Variable Documentation

◆ rtems_shell_FDISK_Command

struct rtems_shell_cmd_tt rtems_shell_FDISK_Command
Initial value:
= {
.name = "fdisk",
.usage = rtems_bdpart_shell_usage,
.topic = "files",
.command = rtems_bdpart_shell_main,
.alias = NULL,
.next = NULL
}
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54