Move OS-dependent files to grub-core/osdep and document it.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 8 Oct 2013 15:30:22 +0000 (17:30 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 8 Oct 2013 15:30:22 +0000 (17:30 +0200)
30 files changed:
ChangeLog
Makefile.util.def
docs/grub-dev.texi
grub-core/osdep/apple/getroot.c [moved from util/getroot_apple.c with 100% similarity]
grub-core/osdep/apple/hostdisk.c [moved from grub-core/kern/emu/hostdisk_apple.c with 100% similarity]
grub-core/osdep/aros/getroot.c [moved from util/getroot_aros.c with 100% similarity]
grub-core/osdep/aros/hostdisk.c [moved from grub-core/kern/emu/hostdisk_aros.c with 100% similarity]
grub-core/osdep/basic/getroot.c [moved from util/getroot_basic.c with 100% similarity]
grub-core/osdep/basic/hostdisk.c [moved from grub-core/kern/emu/hostdisk_basic.c with 100% similarity]
grub-core/osdep/bsd/getroot.c [moved from util/getroot_bsd.c with 100% similarity]
grub-core/osdep/bsd/hostdisk.c [moved from grub-core/kern/emu/hostdisk_bsd.c with 100% similarity]
grub-core/osdep/devmapper/getroot.c [moved from util/getroot_devmapper.c with 100% similarity]
grub-core/osdep/devmapper/hostdisk.c [moved from grub-core/kern/emu/hostdisk_devmapper.c with 100% similarity]
grub-core/osdep/freebsd/getroot.c [moved from util/getroot_freebsd.c with 100% similarity]
grub-core/osdep/freebsd/hostdisk.c [moved from grub-core/kern/emu/hostdisk_freebsd.c with 100% similarity]
grub-core/osdep/getroot.c [moved from util/getroot_os.c with 62% similarity]
grub-core/osdep/hostdisk.c [moved from grub-core/kern/emu/hostdisk_os.c with 61% similarity]
grub-core/osdep/hurd/getroot.c [moved from util/getroot_hurd.c with 100% similarity]
grub-core/osdep/hurd/hostdisk.c [moved from grub-core/kern/emu/hostdisk_hurd.c with 100% similarity]
grub-core/osdep/linux/getroot.c [moved from util/getroot_linux.c with 100% similarity]
grub-core/osdep/linux/hostdisk.c [moved from grub-core/kern/emu/hostdisk_linux.c with 100% similarity]
grub-core/osdep/random.c [moved from util/random.c with 52% similarity]
grub-core/osdep/sun/getroot.c [moved from util/getroot_sun.c with 100% similarity]
grub-core/osdep/sun/hostdisk.c [moved from grub-core/kern/emu/hostdisk_sun.c with 100% similarity]
grub-core/osdep/unix/getroot.c [moved from util/getroot_unix.c with 100% similarity]
grub-core/osdep/unix/hostdisk.c [moved from grub-core/kern/emu/hostdisk_unix.c with 100% similarity]
grub-core/osdep/unix/random.c [moved from util/random_unix.c with 100% similarity]
grub-core/osdep/windows/getroot.c [moved from util/getroot_windows.c with 100% similarity]
grub-core/osdep/windows/hostdisk.c [moved from grub-core/kern/emu/hostdisk_windows.c with 100% similarity]
grub-core/osdep/windows/random.c [moved from util/random_windows.c with 100% similarity]

index 70ff1c0..deaba66 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-08  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Move OS-dependent files to grub-core/osdep and document it.
+
 2013-10-08  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/kern/emu/misc.c (canonicalize_file_name): Move to ...
index 710be2f..8131108 100644 (file)
@@ -10,13 +10,13 @@ library = {
   common = grub-core/kern/device.c;
   common = grub-core/kern/disk.c;
   common = util/getroot.c;
-  common = util/getroot_unix.c;
-  common = util/getroot_os.c;
-  common = util/getroot_devmapper.c;
+  common = grub-core/osdep/unix/getroot.c;
+  common = grub-core/osdep/getroot.c;
+  common = grub-core/osdep/devmapper/getroot.c;
   common = grub-core/kern/emu/hostdisk.c;
-  common = grub-core/kern/emu/hostdisk_devmapper.c;
-  common = grub-core/kern/emu/hostdisk_os.c;
-  common = grub-core/kern/emu/hostdisk_unix.c;
+  common = grub-core/osdep/devmapper/hostdisk.c;
+  common = grub-core/osdep/hostdisk.c;
+  common = grub-core/osdep/unix/hostdisk.c;
   common = grub-core/kern/emu/misc.c;
   common = grub-core/kern/emu/mm.c;
   common = grub-core/kern/env.c;
@@ -221,7 +221,7 @@ program = {
 
   common = util/grub-mkpasswd-pbkdf2.c;
   common = grub-core/kern/emu/argp_common.c;
-  common = util/random.c;
+  common = grub-core/osdep/random.c;
 
   ldadd = libgrubmods.a;
   ldadd = libgrubgcry.a;
index 53f7010..9499f8b 100644 (file)
@@ -286,14 +286,19 @@ live under @file{grub-core/term/}.
 
 @item
 The @samp{efiemu_*} commands live under @file{grub-core/efiemu/}.
+
+@item
+OS-dependent code should be under @file{grub-core/osdep/}
+
+@item
+Utility programs meant to be run from a full operating system
+(except OS-dependent code mentioned previously) are in @file{util/}.
+
 @end itemize
 
 There are a few other special-purpose exceptions; grep for them if they
 matter to you.
 
-Utility programs meant to be run from a full operating system are in
-@file{util/}.
-
 @node Contributing Changes
 @chapter Contributing changes
 @c By YoshinoriOkuji, VesaJääskeläinen, ColinWatson
similarity index 62%
rename from util/getroot_os.c
rename to grub-core/osdep/getroot.c
index ed20e5f..6392a29 100644 (file)
@@ -1,20 +1,20 @@
 #ifdef __linux__
-#include "getroot_linux.c"
+#include "linux/getroot.c"
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#include "getroot_freebsd.c"
+#include "freebsd/getroot.c"
 #elif defined(__NetBSD__) || defined(__OpenBSD__)
-#include "getroot_bsd.c"
+#include "bsd/getroot.c"
 #elif defined(__APPLE__)
-#include "getroot_apple.c"
+#include "apple/getroot.c"
 #elif defined(__sun__)
-#include "getroot_sun.c"
+#include "sun/getroot.c"
 #elif defined(__GNU__)
-#include "getroot_hurd.c"
+#include "hurd/getroot.c"
 #elif defined(__CYGWIN__) || defined (__MINGW32__)
-#include "getroot_windows.c"
+#include "windows/getroot.c"
 #elif defined(__AROS__)
-#include "getroot_aros.c"
+#include "aros/getroot.c"
 #else
 # warning "No getroot OS-specific functions is available for your system. Device detection may not work properly."
-#include "getroot_basic.c"
+#include "basic/getroot.c"
 #endif
similarity index 61%
rename from grub-core/kern/emu/hostdisk_os.c
rename to grub-core/osdep/hostdisk.c
index 904ab0d..ae491b5 100644 (file)
@@ -1,20 +1,20 @@
 #ifdef __linux__
-#include "hostdisk_linux.c"
+#include "linux/hostdisk.c"
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#include "hostdisk_freebsd.c"
+#include "freebsd/hostdisk.c"
 #elif defined(__NetBSD__) || defined(__OpenBSD__)
-#include "hostdisk_bsd.c"
+#include "bsd/hostdisk.c"
 #elif defined(__APPLE__)
-#include "hostdisk_apple.c"
+#include "apple/hostdisk.c"
 #elif defined(__sun__)
-#include "hostdisk_sun.c"
+#include "sun/hostdisk.c"
 #elif defined(__GNU__)
-#include "hostdisk_hurd.c"
+#include "hurd/hostdisk.c"
 #elif defined(__CYGWIN__) || defined(__MINGW32__)
-#include "hostdisk_windows.c"
+#include "windows/hostdisk.c"
 #elif defined(__AROS__)
-#include "hostdisk_aros.c"
+#include "aros/hostdisk.c"
 #else
 # warning "No hostdisk OS-specific functions is available for your system. Device detection may not work properly."
-#include "hostdisk_basic.c"
+#include "basic/hostdisk.c"
 #endif
similarity index 52%
rename from util/random.c
rename to grub-core/osdep/random.c
index 8ace0e4..355c112 100644 (file)
@@ -1,5 +1,5 @@
 #if defined (_WIN32) || defined (__CYGWIN__)
-#include "random_windows.c"
+#include "windows/random.c"
 #else
-#include "random_unix.c"
+#include "unix/random.c"
 #endif