svn commit: trunk/busybox: include networking util-linux
aldot at busybox.net
aldot at busybox.net
Tue Jan 31 09:53:56 UTC 2006
Author: aldot
Date: 2006-01-31 01:53:53 -0800 (Tue, 31 Jan 2006)
New Revision: 13751
Log:
- add and use ATTRIBUTE_ALIGNED(num_bytes)
- remove unused parameter pindex from fdisk.c, xbsd_initlabel()
Modified:
trunk/busybox/include/platform.h
trunk/busybox/networking/traceroute.c
trunk/busybox/util-linux/fdisk.c
Changeset:
Modified: trunk/busybox/include/platform.h
===================================================================
--- trunk/busybox/include/platform.h 2006-01-31 09:44:04 UTC (rev 13750)
+++ trunk/busybox/include/platform.h 2006-01-31 09:53:53 UTC (rev 13751)
@@ -55,6 +55,10 @@
#define ATTRIBUTE_PACKED __attribute__ ((__packed__))
#endif /* ATTRIBUTE_NORETURN */
+#ifndef ATTRIBUTE_ALIGNED
+#define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
+#endif /* ATTRIBUTE_ALIGNED */
+
/* -fwhole-program makes all symbols local. The attribute externally_visible
forces a symbol global. */
#ifndef ATTRIBUTE_EXTERNALLY_VISIBLE
Modified: trunk/busybox/networking/traceroute.c
===================================================================
--- trunk/busybox/networking/traceroute.c 2006-01-31 09:44:04 UTC (rev 13750)
+++ trunk/busybox/networking/traceroute.c 2006-01-31 09:53:53 UTC (rev 13751)
@@ -293,7 +293,7 @@
static const char route[] = "/proc/net/route";
/* last inbound (icmp) packet */
-static u_char packet[512] __attribute__((aligned (32)));
+static u_char packet[512] ATTRIBUTE_ALIGNED(32);
static struct ip *outip; /* last output (udp) packet */
static struct udphdr *outudp; /* last output (udp) packet */
Modified: trunk/busybox/util-linux/fdisk.c
===================================================================
--- trunk/busybox/util-linux/fdisk.c 2006-01-31 09:44:04 UTC (rev 13750)
+++ trunk/busybox/util-linux/fdisk.c 2006-01-31 09:53:53 UTC (rev 13751)
@@ -867,8 +867,7 @@
static int xbsd_check_new_partition (int *i);
static void xbsd_list_types (void);
static u_short xbsd_dkcksum (struct xbsd_disklabel *lp);
-static int xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d,
- int pindex);
+static int xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d);
static int xbsd_readlabel (struct partition *p, struct xbsd_disklabel *d);
static int xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d);
@@ -885,7 +884,7 @@
#if defined (__alpha__)
/* We access this through a uint64_t * when checksumming */
-static char disklabelbuffer[BSD_BBSIZE] __attribute__((aligned(8)));
+static char disklabelbuffer[BSD_BBSIZE] ATTRIBUTE_ALIGNED(8);
#else
static char disklabelbuffer[BSD_BBSIZE];
#endif
@@ -1223,9 +1222,9 @@
if (xbsd_initlabel (
#if defined (__alpha__) || defined (__powerpc__) || defined (__hppa__) || \
defined (__s390__) || defined (__s390x__)
- NULL, &xbsd_dlabel, 0
+ NULL, &xbsd_dlabel
#else
- xbsd_part, &xbsd_dlabel, xbsd_part_index
+ xbsd_part, &xbsd_dlabel/* not used, xbsd_part_index*/
#endif
) == 1) {
xbsd_print_disklabel (1);
@@ -1454,7 +1453,7 @@
}
static int
-xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d, int pindex) {
+xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d) {
struct xbsd_partition *pp;
get_geometry ();
More information about the busybox-cvs
mailing list