aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Kasanen <curaga@operamail.com>2010-07-04 00:04:03 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-04 00:04:03 +0200
commit7c1b2b5420d4208864b8bc6e07e90792aed94981 (patch)
treec2c94e95289de30c85495a91b9615cab394beaf3
parent5c296de390b1329a6243d12a86ef9c4726ace22a (diff)
downloadbusybox-w32-7c1b2b5420d4208864b8bc6e07e90792aed94981.tar.gz
busybox-w32-7c1b2b5420d4208864b8bc6e07e90792aed94981.tar.bz2
busybox-w32-7c1b2b5420d4208864b8bc6e07e90792aed94981.zip
losetup: use LOOP_foo defines
Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/libbb.h12
-rw-r--r--util-linux/losetup.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 53b768d88..e26001705 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1606,18 +1606,18 @@ extern const char bb_default_login_shell[];
1606# define VC_3 "/dev/vc/3" 1606# define VC_3 "/dev/vc/3"
1607# define VC_4 "/dev/vc/4" 1607# define VC_4 "/dev/vc/4"
1608# define VC_5 "/dev/vc/5" 1608# define VC_5 "/dev/vc/5"
1609#if defined(__sh__) || defined(__H8300H__) || defined(__H8300S__) 1609# if defined(__sh__) || defined(__H8300H__) || defined(__H8300S__)
1610/* Yes, this sucks, but both SH (including sh64) and H8 have a SCI(F) for their 1610/* Yes, this sucks, but both SH (including sh64) and H8 have a SCI(F) for their
1611 respective serial ports .. as such, we can't use the common device paths for 1611 respective serial ports .. as such, we can't use the common device paths for
1612 these. -- PFM */ 1612 these. -- PFM */
1613# define SC_0 "/dev/ttsc/0" 1613# define SC_0 "/dev/ttsc/0"
1614# define SC_1 "/dev/ttsc/1" 1614# define SC_1 "/dev/ttsc/1"
1615# define SC_FORMAT "/dev/ttsc/%d" 1615# define SC_FORMAT "/dev/ttsc/%d"
1616#else 1616# else
1617# define SC_0 "/dev/tts/0" 1617# define SC_0 "/dev/tts/0"
1618# define SC_1 "/dev/tts/1" 1618# define SC_1 "/dev/tts/1"
1619# define SC_FORMAT "/dev/tts/%d" 1619# define SC_FORMAT "/dev/tts/%d"
1620#endif 1620# endif
1621# define VC_FORMAT "/dev/vc/%d" 1621# define VC_FORMAT "/dev/vc/%d"
1622# define LOOP_FORMAT "/dev/loop/%d" 1622# define LOOP_FORMAT "/dev/loop/%d"
1623# define LOOP_NAMESIZE (sizeof("/dev/loop/") + sizeof(int)*3 + 1) 1623# define LOOP_NAMESIZE (sizeof("/dev/loop/") + sizeof(int)*3 + 1)
@@ -1630,15 +1630,15 @@ extern const char bb_default_login_shell[];
1630# define VC_3 "/dev/tty3" 1630# define VC_3 "/dev/tty3"
1631# define VC_4 "/dev/tty4" 1631# define VC_4 "/dev/tty4"
1632# define VC_5 "/dev/tty5" 1632# define VC_5 "/dev/tty5"
1633#if defined(__sh__) || defined(__H8300H__) || defined(__H8300S__) 1633# if defined(__sh__) || defined(__H8300H__) || defined(__H8300S__)
1634# define SC_0 "/dev/ttySC0" 1634# define SC_0 "/dev/ttySC0"
1635# define SC_1 "/dev/ttySC1" 1635# define SC_1 "/dev/ttySC1"
1636# define SC_FORMAT "/dev/ttySC%d" 1636# define SC_FORMAT "/dev/ttySC%d"
1637#else 1637# else
1638# define SC_0 "/dev/ttyS0" 1638# define SC_0 "/dev/ttyS0"
1639# define SC_1 "/dev/ttyS1" 1639# define SC_1 "/dev/ttyS1"
1640# define SC_FORMAT "/dev/ttyS%d" 1640# define SC_FORMAT "/dev/ttyS%d"
1641#endif 1641# endif
1642# define VC_FORMAT "/dev/tty%d" 1642# define VC_FORMAT "/dev/tty%d"
1643# define LOOP_FORMAT "/dev/loop%d" 1643# define LOOP_FORMAT "/dev/loop%d"
1644# define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1) 1644# define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1)
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index 0f5914c88..3873be399 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -65,9 +65,9 @@ int losetup_main(int argc UNUSED_PARAM, char **argv)
65 n = 0; 65 n = 0;
66 while (1) { 66 while (1) {
67 char *s; 67 char *s;
68 char dev[sizeof(LOOP_NAME) + sizeof(int)*3]; 68 char dev[LOOP_NAMESIZE];
69 69
70 sprintf(dev, LOOP_NAME"%u", n); 70 sprintf(dev, LOOP_FORMAT, n);
71 s = query_loop(dev); 71 s = query_loop(dev);
72 n++; 72 n++;
73 if (!s) { 73 if (!s) {