aboutsummaryrefslogtreecommitdiff
path: root/toys/mkfifo.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2008-01-20 17:25:44 -0600
committerRob Landley <rob@landley.net>2008-01-20 17:25:44 -0600
commitb1aaba1fc8176ac0b7c202a664d2554aa0967116 (patch)
tree7bbd14f5dd2413a6b913ea04b0bdf746a2d5b1fb /toys/mkfifo.c
parenteb9b8da0698aacd14f5aa0879d2a8e390c0c6c13 (diff)
downloadtoybox-b1aaba1fc8176ac0b7c202a664d2554aa0967116.tar.gz
Zap toylist.h, moving contents of global structures into DEFINE_GLOBALS()
macros in each C file, and making generated/globals.h from that. Rename "toy" to "this" along the way to avoid toy/toys confusion.
Diffstat (limited to 'toys/mkfifo.c')
-rw-r--r--toys/mkfifo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/toys/mkfifo.c b/toys/mkfifo.c
index 5ddfa6c1..0f57ca5d 100644
--- a/toys/mkfifo.c
+++ b/toys/mkfifo.c
@@ -21,6 +21,12 @@ config MKFIFO
#include "toys.h"
+DEFINE_GLOBALS(
+ char *mode;
+)
+
+#define TT this.mkfifo
+
void mkfifo_main(void)
{
char *arg;
@@ -29,8 +35,8 @@ void mkfifo_main(void)
if (toys.optflags) {
char *end;
- mode = (mode_t)strtol(toy.mkfifo.mode, &end, 8);
- if (end<=toy.mkfifo.mode || *end || mode<0 || mode>0777)
+ mode = (mode_t)strtol(TT.mode, &end, 8);
+ if (end<=TT.mode || *end || mode<0 || mode>0777)
error_exit("Invalid mode");
} else mode = 0644;