summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisk.h
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:26:28 +0100
committerKarel Zak2006-12-07 00:26:28 +0100
commit5213517f54c70a784c06ee85c066aa2b4f375c4b (patch)
treebd0b55ed9621bf27f70fc2e338a9816496246beb /fdisk/fdisk.h
parentImported from util-linux-2.12k tarball. (diff)
downloadkernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.tar.gz
kernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.tar.xz
kernel-qcow2-util-linux-5213517f54c70a784c06ee85c066aa2b4f375c4b.zip
Imported from util-linux-2.12l tarball.
Diffstat (limited to 'fdisk/fdisk.h')
-rw-r--r--fdisk/fdisk.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h
index 6daadd90b..13c07147b 100644
--- a/fdisk/fdisk.h
+++ b/fdisk/fdisk.h
@@ -29,6 +29,12 @@
extern long long ext2_llseek(unsigned int fd, long long offset,
unsigned int origin);
+#if defined(__GNUC__) && (defined(__arm__) || defined(__alpha__))
+# define PACKED __attribute__ ((packed))
+#else
+# define PACKED
+#endif
+
struct partition {
unsigned char boot_ind; /* 0x80 - active */
unsigned char head; /* starting head */
@@ -40,7 +46,7 @@ struct partition {
unsigned char end_cyl; /* end cylinder */
unsigned char start4[4]; /* starting sector counting from 0 */
unsigned char size4[4]; /* nr of sectors in partition */
-};
+} PACKED;
enum failure {usage, usage2, ioctl_error,
unable_to_open, unable_to_read, unable_to_seek,