From 885fdebc13b13307555e4b837fae604bcc4e72b4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 9 Mar 2015 00:07:44 +0100 Subject: tree-wide: use _packed_ macro instead of raw gcc __attribute__ --- src/udev/mtd_probe/mtd_probe.c | 4 +++- src/udev/mtd_probe/mtd_probe.h | 6 +++--- src/udev/udev-builtin-usb_id.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/udev') diff --git a/src/udev/mtd_probe/mtd_probe.c b/src/udev/mtd_probe/mtd_probe.c index 13c757bd1c..67b750c4b3 100644 --- a/src/udev/mtd_probe/mtd_probe.c +++ b/src/udev/mtd_probe/mtd_probe.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA */ -#include "mtd_probe.h" + #include #include #include @@ -26,6 +26,8 @@ #include #include +#include "mtd_probe.h" + int main(int argc, char** argv) { int mtd_fd; diff --git a/src/udev/mtd_probe/mtd_probe.h b/src/udev/mtd_probe/mtd_probe.h index d99be9addc..caea5c2693 100644 --- a/src/udev/mtd_probe/mtd_probe.h +++ b/src/udev/mtd_probe/mtd_probe.h @@ -21,6 +21,8 @@ #include +#include "macro.h" + /* Full oob structure as written on the flash */ struct sm_oob { uint32_t reserved; @@ -30,8 +32,7 @@ struct sm_oob { uint8_t ecc2[3]; uint8_t lba_copy2[2]; uint8_t ecc1[3]; -} __attribute__((packed)); - +} _packed_; /* one sector is always 512 bytes, but it can consist of two nand pages */ #define SM_SECTOR_SIZE 512 @@ -47,5 +48,4 @@ struct sm_oob { #define SM_SMALL_PAGE 256 #define SM_SMALL_OOB_SIZE 8 - void probe_smart_media(int mtd_fd, mtd_info_t *info); diff --git a/src/udev/udev-builtin-usb_id.c b/src/udev/udev-builtin-usb_id.c index ab0d96e377..264ff5d6f7 100644 --- a/src/udev/udev-builtin-usb_id.c +++ b/src/udev/udev-builtin-usb_id.c @@ -162,7 +162,7 @@ static int dev_if_packed_info(struct udev_device *dev, char *ifs_str, size_t len u_int8_t bInterfaceSubClass; u_int8_t bInterfaceProtocol; u_int8_t iInterface; - } __attribute__((packed)); + } _packed_; if (asprintf(&filename, "%s/descriptors", udev_device_get_syspath(dev)) < 0) return log_oom(); -- cgit v1.2.3-54-g00ecf