RTEMS  5.1
Macros | Enumerations
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 }
 

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; \
}
Definition: status.h:47
const char * rtems_status_text(rtems_status_code code)
Returns a text for a status code.
Definition: statustext.c:60