mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-11-23 23:10:57 +07:00
tree-wide: use _packed_ macro instead of raw gcc __attribute__
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
3fa57f4051
commit
60e1a98116
@ -1,5 +1,8 @@
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I $(top_srcdir)/src/shared
|
||||
|
||||
udevlibexec_PROGRAMS = \
|
||||
mtd_probe
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#include "mtd_probe.h"
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <mtd/mtd-user.h>
|
||||
@ -30,6 +29,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "mtd_probe.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <mtd/mtd-user.h>
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
/* Full oob structure as written on the flash */
|
||||
struct sm_oob {
|
||||
uint32_t reserved;
|
||||
@ -28,8 +30,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
|
||||
@ -45,5 +46,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);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user