aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-08 12:49:22 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-08 12:49:22 +0000
commit87d25a2b8535dc627a02eb539fa3946be2a24647 (patch)
treefc4d14a910593d1235318bb36abe5e9f72d2039e /runit
parent81177b14907e73f11560f69e0b4ec34371f1a7d5 (diff)
downloadbusybox-w32-87d25a2b8535dc627a02eb539fa3946be2a24647.tar.gz
busybox-w32-87d25a2b8535dc627a02eb539fa3946be2a24647.tar.bz2
busybox-w32-87d25a2b8535dc627a02eb539fa3946be2a24647.zip
attempt to regularize atoi mess.
git-svn-id: svn://busybox.net/trunk/busybox@16342 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'runit')
-rw-r--r--runit/chpst.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/runit/chpst.c b/runit/chpst.c
index 4c44e3c0c..5f30b8815 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -22,7 +22,7 @@ static long limitf = -2;
22static long limitc = -2; 22static long limitc = -2;
23static long limitr = -2; 23static long limitr = -2;
24static long limitt = -2; 24static long limitt = -2;
25static long nicelvl; 25static int nicelvl;
26static const char *root; 26static const char *root;
27 27
28static void suidgid(char *user) 28static void suidgid(char *user)
@@ -229,16 +229,16 @@ int chpst_main(int argc, char **argv)
229 // if (option_mask32 & 0x1) // -u 229 // if (option_mask32 & 0x1) // -u
230 // if (option_mask32 & 0x2) // -U 230 // if (option_mask32 & 0x2) // -U
231 // if (option_mask32 & 0x4) // -e 231 // if (option_mask32 & 0x4) // -e
232 if (option_mask32 & 0x8) limits = limitl = limita = limitd = bb_xgetularg10(m); // -m 232 if (option_mask32 & 0x8) limits = limitl = limita = limitd = xatoul(m); // -m
233 if (option_mask32 & 0x10) limitd = bb_xgetularg10(d); // -d 233 if (option_mask32 & 0x10) limitd = xatoul(d); // -d
234 if (option_mask32 & 0x20) limito = bb_xgetularg10(o); // -o 234 if (option_mask32 & 0x20) limito = xatoul(o); // -o
235 if (option_mask32 & 0x40) limitp = bb_xgetularg10(p); // -p 235 if (option_mask32 & 0x40) limitp = xatoul(p); // -p
236 if (option_mask32 & 0x80) limitf = bb_xgetularg10(f); // -f 236 if (option_mask32 & 0x80) limitf = xatoul(f); // -f
237 if (option_mask32 & 0x100) limitc = bb_xgetularg10(c); // -c 237 if (option_mask32 & 0x100) limitc = xatoul(c); // -c
238 if (option_mask32 & 0x200) limitr = bb_xgetularg10(r); // -r 238 if (option_mask32 & 0x200) limitr = xatoul(r); // -r
239 if (option_mask32 & 0x400) limitt = bb_xgetularg10(t); // -t 239 if (option_mask32 & 0x400) limitt = xatoul(t); // -t
240 // if (option_mask32 & 0x800) // -/ 240 // if (option_mask32 & 0x800) // -/
241 if (option_mask32 & 0x1000) nicelvl = bb_xgetlarg_bnd_sfx(n, 10, -20, 20, NULL); // -n 241 if (option_mask32 & 0x1000) nicelvl = xatoi(n); // -n
242 // The below consts should match #defines at top! 242 // The below consts should match #defines at top!
243 //if (option_mask32 & 0x2000) OPT_verbose = 1; // -v 243 //if (option_mask32 & 0x2000) OPT_verbose = 1; // -v
244 //if (option_mask32 & 0x4000) OPT_pgrp = 1; // -P 244 //if (option_mask32 & 0x4000) OPT_pgrp = 1; // -P
@@ -312,17 +312,17 @@ static void softlimit(int argc, char **argv)
312 char *a,*c,*d,*f,*l,*m,*o,*p,*r,*s,*t; 312 char *a,*c,*d,*f,*l,*m,*o,*p,*r,*s,*t;
313 getopt32(argc, argv, "a:c:d:f:l:m:o:p:r:s:t:", 313 getopt32(argc, argv, "a:c:d:f:l:m:o:p:r:s:t:",
314 &a,&c,&d,&f,&l,&m,&o,&p,&r,&s,&t); 314 &a,&c,&d,&f,&l,&m,&o,&p,&r,&s,&t);
315 if (option_mask32 & 0x001) limita = bb_xgetularg10(a); // -a 315 if (option_mask32 & 0x001) limita = xatoul(a); // -a
316 if (option_mask32 & 0x002) limitc = bb_xgetularg10(c); // -c 316 if (option_mask32 & 0x002) limitc = xatoul(c); // -c
317 if (option_mask32 & 0x004) limitd = bb_xgetularg10(d); // -d 317 if (option_mask32 & 0x004) limitd = xatoul(d); // -d
318 if (option_mask32 & 0x008) limitf = bb_xgetularg10(f); // -f 318 if (option_mask32 & 0x008) limitf = xatoul(f); // -f
319 if (option_mask32 & 0x010) limitl = bb_xgetularg10(l); // -l 319 if (option_mask32 & 0x010) limitl = xatoul(l); // -l
320 if (option_mask32 & 0x020) limits = limitl = limita = limitd = bb_xgetularg10(m); // -m 320 if (option_mask32 & 0x020) limits = limitl = limita = limitd = xatoul(m); // -m
321 if (option_mask32 & 0x040) limito = bb_xgetularg10(o); // -o 321 if (option_mask32 & 0x040) limito = xatoul(o); // -o
322 if (option_mask32 & 0x080) limitp = bb_xgetularg10(p); // -p 322 if (option_mask32 & 0x080) limitp = xatoul(p); // -p
323 if (option_mask32 & 0x100) limitr = bb_xgetularg10(r); // -r 323 if (option_mask32 & 0x100) limitr = xatoul(r); // -r
324 if (option_mask32 & 0x200) limits = bb_xgetularg10(s); // -s 324 if (option_mask32 & 0x200) limits = xatoul(s); // -s
325 if (option_mask32 & 0x400) limitt = bb_xgetularg10(t); // -t 325 if (option_mask32 & 0x400) limitt = xatoul(t); // -t
326 argv += optind; 326 argv += optind;
327 if (!argv[0]) bb_show_usage(); 327 if (!argv[0]) bb_show_usage();
328 slimit(); 328 slimit();