From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 07/13] ATA/DISK: Share important constants and structures
Date: Tue, 22 Nov 2011 09:29:21 +0100 [thread overview]
Message-ID: <1321950567-13261-8-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1321950567-13261-1-git-send-email-jbe@pengutronix.de>
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
include/disks.h | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
create mode 100644 include/disks.h
diff --git a/include/disks.h b/include/disks.h
new file mode 100644
index 0000000..ec136d4
--- /dev/null
+++ b/include/disks.h
@@ -0,0 +1,39 @@
+/*
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef DISKS_H
+#define DISKS_H
+
+struct block_device;
+
+/** Size of one sector in bytes */
+#define SECTOR_SIZE 512
+
+/** Size of one sector in bit shift */
+#define SECTOR_SHIFT 9
+
+/**
+ * Description of one partition table entry (D*S type)
+ */
+struct partition_entry {
+ uint8_t boot_indicator; /*! Maybe marked as an active partition */
+ uint8_t chs_begin[3]; /*! Start of the partition in cylinders, heads and sectors */
+ uint8_t type; /*! Filesystem type */
+ uint8_t chs_end[3]; /*! End of the partition in cylinders, heads and sectors */
+ uint32_t partition_start; /*! Start of the partition in LBA notation */
+ uint32_t partition_size; /*! Start of the partition in LBA notation */
+} __attribute__ ((packed));
+
+#endif /* DISKS_H */
--
1.7.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-11-22 8:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 8:29 [PATCHv2] Rework of handling disk like media Juergen Beisert
2011-11-22 8:29 ` [PATCH 01/13] USB Mass Storage driver: Fix compile time warning Juergen Beisert
2011-11-22 8:29 ` [PATCH 02/13] Create a unique cdev number for on demand devices Juergen Beisert
2011-11-22 8:29 ` [PATCH 03/13] ATA/DISK: Add generic disk support when enabling the BIOS disk driver Juergen Beisert
2011-11-22 8:29 ` [PATCH 04/13] ATA/DISK: Enabling write support does not belong to 'drive types' Juergen Beisert
2011-11-22 8:29 ` [PATCH 05/13] ATA/DISK: Reorganize file structure and names for future updates Juergen Beisert
2011-11-22 8:29 ` [PATCH 06/13] ATA/DISK: The BIOS based disk driver is not an interface Juergen Beisert
2011-11-22 8:29 ` Juergen Beisert [this message]
2011-11-22 8:29 ` [PATCH 08/13] DISK: Add common partition handling for disk like media Juergen Beisert
2011-11-22 8:29 ` [PATCH 09/13] Use generic block layer to access the drives and do partition parsing Juergen Beisert
2011-11-22 8:29 ` [PATCH 10/13] Remove 'disk_drive.c' as it is now replaced by generic partition handling Juergen Beisert
2011-11-22 8:29 ` [PATCH 11/13] ATA/DISK: Remove the now unused header <ata.h> Juergen Beisert
2011-11-22 8:29 ` [PATCH 12/13] ATA Disk Support: Add support for native ATA type drives Juergen Beisert
2011-11-22 8:29 ` [PATCH 13/13] Add driver for IDE like interfaces Juergen Beisert
-- strict thread matches above, loose matches on Subject: below --
2011-11-24 12:43 [PATCHv3] Rework of handling disk like media Juergen Beisert
2011-11-24 12:43 ` [PATCH 07/13] ATA/DISK: Share important constants and structures Juergen Beisert
2011-11-16 9:24 Rework of handling disk like media Juergen Beisert
2011-11-16 9:24 ` [PATCH 07/13] ATA/DISK: Share important constants and structures Juergen Beisert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1321950567-13261-8-git-send-email-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox