uint32_t attr;
uint16_t path_len;
uint16_t title[];
-} __attribute__((packed));
+} _packed_;
struct drive_path {
uint32_t part_nr;
char signature[16];
uint8_t mbr_type;
uint8_t signature_type;
-} __attribute__((packed));
+} _packed_;
struct device_path {
uint8_t type;
uint16_t path[0];
struct drive_path drive;
};
-} __attribute__((packed));
+} _packed_;
bool is_efi_boot(void) {
return access("/sys/firmware/efi", F_OK) >= 0;
struct var {
uint32_t attr;
char buf[];
- } __attribute__((packed)) *buf = NULL;
+ } _packed_ *buf = NULL;
char *p = NULL;
int fd = -1;
int r;
uint16_t u2;
uint16_t u3;
uint8_t u4[8];
-} __attribute__((packed));
+} _packed_;
static void id128_to_efi_guid(sd_id128_t id, void *guid) {
struct guid *uuid = guid;
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
-#include "mtd_probe.h"
+
#include <stdio.h>
#include <sys/ioctl.h>
#include <mtd/mtd-user.h>
#include <unistd.h>
#include <stdlib.h>
+#include "mtd_probe.h"
+
int main(int argc, char** argv)
{
int mtd_fd;
#include <mtd/mtd-user.h>
+#include "macro.h"
+
/* Full oob structure as written on the flash */
struct sm_oob {
uint32_t reserved;
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
#define SM_SMALL_PAGE 256
#define SM_SMALL_OOB_SIZE 8
-
void probe_smart_media(int mtd_fd, mtd_info_t *info);
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();