summaryrefslogtreecommitdiff
path: root/disk
diff options
context:
space:
mode:
authorJavier Martinez Canillas <[email protected]>2026-02-12 21:44:55 +0100
committerHeinrich Schuchardt <[email protected]>2026-02-15 08:43:58 +0100
commit63d52576e7b7fc39a1e5685065384a4653e4a9ef (patch)
tree3c4b9fa8d313f8fe76cf588d35e1d1a7c012dd63 /disk
parent136faf7b0cc92af1d38b0db1bfaa5405e884ee2d (diff)
disk: part_dos: Move header to the main include directory
There are two different struct definitions for MBR partition table entries: one in part_dos.h and a nearly identical one in part_efi.h. To enable future consolidation of these two structures, move part_dos.h to the main include directory. This makes it accessible from other parts of the codebase, such as part_efi.h, and is the first step toward removing the redundant definition. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'disk')
-rw-r--r--disk/part_dos.c2
-rw-r--r--disk/part_dos.h37
2 files changed, 1 insertions, 38 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 18dd35c9b98..2545cc6bf5d 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -19,7 +19,7 @@
#include <vsprintf.h>
#include <asm/unaligned.h>
#include <linux/compiler.h>
-#include "part_dos.h"
+#include <part_dos.h>
#include <part.h>
#define DOS_PART_DEFAULT_SECTOR 512
diff --git a/disk/part_dos.h b/disk/part_dos.h
deleted file mode 100644
index 50558224228..00000000000
--- a/disk/part_dos.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, [email protected].
- */
-
-#ifndef _DISK_PART_DOS_H
-#define _DISK_PART_DOS_H
-
-#define DOS_PART_DISKSIG_OFFSET 0x1b8
-#define DOS_PART_TBL_OFFSET 0x1be
-#define DOS_PART_MAGIC_OFFSET 0x1fe
-#define DOS_PBR_FSTYPE_OFFSET 0x36
-#define DOS_PBR32_FSTYPE_OFFSET 0x52
-#define DOS_PBR_MEDIA_TYPE_OFFSET 0x15
-#define DOS_MBR 0
-#define DOS_PBR 1
-#define DOS_PART_TYPE_EXTENDED 0x05
-#define DOS_PART_TYPE_EXTENDED_LBA 0x0F
-#define DOS_PART_TYPE_EXTENDED_LINUX 0x85
-
-#define DOS_PART_DEFAULT_GAP 2048
-
-typedef struct dos_partition {
- unsigned char boot_ind; /* 0x80 - active */
- unsigned char head; /* starting head */
- unsigned char sector; /* starting sector */
- unsigned char cyl; /* starting cylinder */
- unsigned char sys_ind; /* What partition type */
- unsigned char end_head; /* end head */
- unsigned char end_sector; /* end sector */
- unsigned char end_cyl; /* end cylinder */
- unsigned char start4[4]; /* starting sector counting from 0 */
- unsigned char size4[4]; /* nr of sectors in partition */
-} dos_partition_t;
-
-#endif /* _DISK_PART_DOS_H */