L4Re/departure

libext2fs/lib/libsupport/common.h

617:2733e5770ee9
9 months ago Paul Boddie Made the run command wait for completion, introducing the spawn command to run programs in the background. Introduced conveniences for waiting for the last job to be initiated and for piping from the last job, also subscribing to signals from pipe-supplying jobs so that they may be transparently removed from the job list upon completion. Augmented the job listing with the "+" notation familiar from Unix. Prevented new jobs from being started when no job slots are available.
     1 /*     2  *     3  *	Various things common for all utilities     4  *     5  */     6      7 #ifndef __QUOTA_COMMON_H__     8 #define __QUOTA_COMMON_H__     9     10 #if EXT2_FLAT_INCLUDES    11 #include "e2_types.h"    12 #else    13 #include <ext2fs/ext2_types.h>    14 #endif /* EXT2_FLAT_INCLUDES */    15     16 /* #define DEBUG_QUOTA 1 */    17     18 #ifndef __attribute__    19 # if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__    20 #  define __attribute__(x)    21 # endif    22 #endif    23     24 #define log_err(format, arg ...)					\    25 	fprintf(stderr, "[ERROR] %s:%d:%s: " format "\n",		\    26 		__FILE__, __LINE__, __func__, ## arg)    27     28 #ifdef DEBUG_QUOTA    29 # define log_debug(format, arg ...)					\    30 	fprintf(stderr, "[DEBUG] %s:%d:%s: " format "\n",		\    31 		__FILE__, __LINE__, __func__, ## arg)    32 #else    33 # define log_debug(...)    34 #endif    35     36 #endif /* __QUOTA_COMMON_H__ */