]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Implement automatic module license checking according to new GNU
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 11 Apr 2011 21:01:51 +0000 (23:01 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 11 Apr 2011 21:01:51 +0000 (23:01 +0200)
guidelines.

* grub-core/kern/dl.c (grub_dl_check_license): New function.
(grub_dl_load_core): Use grub_dl_check_license.
* include/grub/dl.h (GRUB_MOD_SECTION): New macro.
(GRUB_MOD_LICENSE): Likewise.
(GRUB_MOD_DUAL_LICENSE): Likewise.
All modules updated.

175 files changed:
ChangeLog
grub-core/bus/cs5536.c
grub-core/bus/pci.c
grub-core/bus/usb/emu/usb.c
grub-core/bus/usb/ohci.c
grub-core/bus/usb/serial/common.c
grub-core/bus/usb/serial/ftdi.c
grub-core/bus/usb/serial/pl2303.c
grub-core/bus/usb/uhci.c
grub-core/bus/usb/usb.c
grub-core/commands/acpi.c
grub-core/commands/blocklist.c
grub-core/commands/boot.c
grub-core/commands/cat.c
grub-core/commands/cmp.c
grub-core/commands/configfile.c
grub-core/commands/date.c
grub-core/commands/echo.c
grub-core/commands/efi/fixvideo.c
grub-core/commands/efi/loadbios.c
grub-core/commands/efi/lsefimmap.c
grub-core/commands/efi/lsefisystab.c
grub-core/commands/efi/lssal.c
grub-core/commands/extcmd.c
grub-core/commands/gptsync.c
grub-core/commands/halt.c
grub-core/commands/hashsum.c
grub-core/commands/hdparm.c
grub-core/commands/help.c
grub-core/commands/hexdump.c
grub-core/commands/i386/cmostest.c
grub-core/commands/i386/cpuid.c
grub-core/commands/i386/pc/drivemap.c
grub-core/commands/i386/pc/halt.c
grub-core/commands/i386/pc/lsapm.c
grub-core/commands/i386/pc/play.c
grub-core/commands/i386/pc/pxecmd.c
grub-core/commands/i386/pc/sendkey.c
grub-core/commands/ieee1275/suspend.c
grub-core/commands/iorw.c
grub-core/commands/keylayouts.c
grub-core/commands/keystatus.c
grub-core/commands/legacycfg.c
grub-core/commands/loadenv.c
grub-core/commands/ls.c
grub-core/commands/lsacpi.c
grub-core/commands/lsmmap.c
grub-core/commands/lspci.c
grub-core/commands/memrw.c
grub-core/commands/minicmd.c
grub-core/commands/mips/yeeloong/lsspd.c
grub-core/commands/parttool.c
grub-core/commands/password.c
grub-core/commands/password_pbkdf2.c
grub-core/commands/probe.c
grub-core/commands/read.c
grub-core/commands/reboot.c
grub-core/commands/regexp.c
grub-core/commands/search.c
grub-core/commands/search_wrap.c
grub-core/commands/setpci.c
grub-core/commands/sleep.c
grub-core/commands/terminal.c
grub-core/commands/test.c
grub-core/commands/testload.c
grub-core/commands/true.c
grub-core/commands/usbtest.c
grub-core/commands/videoinfo.c
grub-core/commands/videotest.c
grub-core/commands/xnu_uuid.c
grub-core/disk/ata.c
grub-core/disk/ata_pthru.c
grub-core/disk/dmraid_nvidia.c
grub-core/disk/i386/pc/biosdisk.c
grub-core/disk/ieee1275/nand.c
grub-core/disk/loopback.c
grub-core/disk/lvm.c
grub-core/disk/mdraid1x_linux.c
grub-core/disk/mdraid_linux.c
grub-core/disk/memdisk.c
grub-core/disk/raid.c
grub-core/disk/raid5_recover.c
grub-core/disk/raid6_recover.c
grub-core/disk/scsi.c
grub-core/disk/usbms.c
grub-core/efiemu/main.c
grub-core/font/font.c
grub-core/fs/affs.c
grub-core/fs/afs.c
grub-core/fs/btrfs.c
grub-core/fs/cpio.c
grub-core/fs/ext2.c
grub-core/fs/fat.c
grub-core/fs/fshelp.c
grub-core/fs/hfs.c
grub-core/fs/hfsplus.c
grub-core/fs/i386/pc/pxe.c
grub-core/fs/iso9660.c
grub-core/fs/jfs.c
grub-core/fs/minix.c
grub-core/fs/nilfs2.c
grub-core/fs/ntfs.c
grub-core/fs/ntfscomp.c
grub-core/fs/reiserfs.c
grub-core/fs/sfs.c
grub-core/fs/udf.c
grub-core/fs/ufs.c
grub-core/fs/xfs.c
grub-core/fs/zfs/zfs.c
grub-core/fs/zfs/zfsinfo.c
grub-core/gentrigtables.c
grub-core/gettext/gettext.c
grub-core/gfxmenu/gfxmenu.c
grub-core/gnulib/regex.c
grub-core/hello/hello.c
grub-core/hook/datehook.c
grub-core/io/bufio.c
grub-core/io/gzio.c
grub-core/io/xzio.c
grub-core/kern/dl.c
grub-core/kern/elf.c
grub-core/lib/cmos_datetime.c
grub-core/lib/crypto.c
grub-core/lib/pbkdf2.c
grub-core/lib/relocator.c
grub-core/loader/aout.c
grub-core/loader/efi/appleloader.c
grub-core/loader/efi/chainloader.c
grub-core/loader/i386/bsd.c
grub-core/loader/i386/linux.c
grub-core/loader/i386/pc/chainloader.c
grub-core/loader/i386/pc/linux.c
grub-core/loader/i386/pc/ntldr.c
grub-core/loader/mips/linux.c
grub-core/loader/multiboot.c
grub-core/loader/powerpc/ieee1275/linux.c
grub-core/loader/sparc64/ieee1275/linux.c
grub-core/loader/xnu.c
grub-core/mmap/mmap.c
grub-core/normal/main.c
grub-core/partmap/acorn.c
grub-core/partmap/amiga.c
grub-core/partmap/apple.c
grub-core/partmap/bsdlabel.c
grub-core/partmap/gpt.c
grub-core/partmap/msdos.c
grub-core/partmap/sun.c
grub-core/partmap/sunpc.c
grub-core/parttool/msdospart.c
grub-core/term/at_keyboard.c
grub-core/term/gfxterm.c
grub-core/term/i386/pc/vga_text.c
grub-core/term/serial.c
grub-core/term/terminfo.c
grub-core/term/usb_keyboard.c
grub-core/tests/example_functional_test.c
grub-core/tests/lib/functional_test.c
grub-core/tests/test_blockarg.c
grub-core/video/bitmap.c
grub-core/video/bitmap_scale.c
grub-core/video/bochs.c
grub-core/video/cirrus.c
grub-core/video/efi_gop.c
grub-core/video/efi_uga.c
grub-core/video/emu/sdl.c
grub-core/video/fb/video_fb.c
grub-core/video/i386/pc/vbe.c
grub-core/video/i386/pc/vga.c
grub-core/video/ieee1275.c
grub-core/video/readers/jpeg.c
grub-core/video/readers/png.c
grub-core/video/readers/tga.c
grub-core/video/video.c
include/grub/dl.h
util/import_gcry.py

index 295a23d1a17d89bce7615e9df1486f699147a5b8..a3d1e7f92a3fe4d83258ee2adb3b421102d2d0b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-04-11  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Implement automatic module license checking according to new GNU
+       guidelines.
+
+       * grub-core/kern/dl.c (grub_dl_check_license): New function.
+       (grub_dl_load_core): Use grub_dl_check_license.
+       * include/grub/dl.h (GRUB_MOD_SECTION): New macro.
+       (GRUB_MOD_LICENSE): Likewise.
+       (GRUB_MOD_DUAL_LICENSE): Likewise.
+       All modules updated.
+
 2011-04-11  Colin Watson  <cjwatson@ubuntu.com>
 
        * grub-core/fs/btrfs.c (grub_btrfs_fs) [GRUB_UTIL]: Set
index 088f4dfc1d52cf6da4e46a0c7ffd2a9661e29848..fbcb83cfe32062fca8d49b985cff405e12ece44a 100644 (file)
 #include <grub/time.h>
 #include <grub/ata.h>
 
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
 int
 grub_cs5536_find (grub_pci_device_t *devp)
 {
index 11101d42b77bf316f91f351fa46fd57b505306e7..07d20e3f5db5c97ccecfb1351621142700464d9a 100644 (file)
@@ -21,6 +21,8 @@
 #include <grub/pci.h>
 #include <grub/mm.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* FIXME: correctly support 64-bit architectures.  */
 /* #if GRUB_TARGET_SIZEOF_VOID_P == 4 */
 struct grub_pci_dma_chunk *
index 7d52decb2969fe05c6a0c2384183a195e84b6a41..38c5f01f1025430bf581c5154a3d71d95c7313a9 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/usb.h>
 #include <grub/dl.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 \f
 static struct grub_usb_controller_dev usb_controller =
 {
index 8adaee6e0c2915f94358be7f9263c6dcd181f724..df0d0f4afe763fafe0fa3298361e56fd177c8a21 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/cs5536.h>
 #include <grub/loader.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 struct grub_ohci_hcca
 {
   /* Pointers to Interrupt Endpoint Descriptors.  Not used by
index ee8794de0900fce7b2697392025fff61fb7b48dd..55d1884ccefc79042332393324904530bf6b3ca2 100644 (file)
@@ -18,6 +18,9 @@
 
 #include <grub/serial.h>
 #include <grub/usbserial.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 void
 grub_usbserial_fini (struct grub_serial_port *port)
index bd1713b27c046d3b04c794ce21a5cf65de377c70..07ac7ac521d92c483091d91e6c0ad03144c3a463 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/usb.h>
 #include <grub/usbserial.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 enum
   {
     GRUB_FTDI_MODEM_CTRL = 0x01,
index 9e3b9ae7eb948e38e8546878a0eefae6fee3ed10..b9954116ba2b945d4e77a5eca7afb60d85fd6f33 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/usb.h>
 #include <grub/usbserial.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Convert speed to divisor.  */
 static grub_uint32_t
 is_speed_supported (unsigned int speed)
index 71142846b005fd2ca74596de33bcc8673f191bb9..99e597f6d37129bc92445a70d930358f8b195047 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/i386/io.h>
 #include <grub/time.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_UHCI_IOMASK       (0x7FF << 5)
 
 #define N_QH  256
index 70173b7ea8ee594aa4bc440a9269a135a6ef4266..005d3bcf0ef6199a79444b4e7c7fc56fcf605c58 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/list.h>
 #include <grub/term.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_usb_controller_dev_t grub_usb_list;
 static struct grub_usb_attach_desc *attach_hooks;
 
index 4f03997e0df80f7cbf0d350dad20384038b71f90..8f44296277262e992dc38d580ab107a6d586bf70 100644 (file)
@@ -33,6 +33,8 @@
 #include <grub/efi/api.h>
 #endif
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] = {
   {"exclude", 'x', 0,
    N_("Don't load host tables specified by comma-separated list."),
index 4651fb32ae56a321933c623c8d620b486822f355..5eb12e4348931a975564855bf89e31576de96d9e 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
                    int argc, char **args)
index 1ec1e6f77f75c1425c4ca8d261667ad94190d6ca..7714011bfc45be4d073a485b9c9823fed96ab6d6 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/mm.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t (*grub_loader_boot_func) (void);
 static grub_err_t (*grub_loader_unload_func) (void);
 static int grub_loader_noreturn;
index 79ecf75c7009a998af0387e39d0f10dae8c27e60..9be6cbc8ff99e1e81d366357a27b2b6a6c002668 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {"dos", -1, 0, N_("Accept DOS-style CR/NL line endings."), 0, 0},
index d9e76a4d72407dd91c7ed6274a976daa1c5459fa..0222927b6f85829099a72a084ebee4a416b7261f 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define BUFFER_SIZE 512
 
 static grub_err_t
index 2568b7ee6035380521248c68e1799036d9044ca1..124a09a9e0096c1e4e01b5bd9c76ae7a017bdce9 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_source (grub_command_t cmd, int argc, char **args)
 {
index 623db494305114afb944a15c1d8605bd0f3de4cf..d27162077fc28443512cd14c140b9004818f7e6d 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_DATETIME_SET_YEAR         1
 #define GRUB_DATETIME_SET_MONTH                2
 #define GRUB_DATETIME_SET_DAY          4
index 93a452fc8eb776e15bc2459bd3d1f2546f3d800d..81ba50d6850c34c9f19f9d8ff7d52c93ac698c29 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/i18n.h>
 #include <grub/term.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {0, 'n', 0, N_("Do not output the trailing newline."), 0, 0},
index 6430be5e34aec36aa88de291a1946ef274acd609..c53e47d8a089d2f820b3d98894a59cad16c5de69 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static struct grub_video_patch
 {
   const char *name;
index 8c7c25abd477ae84107a1ee1c186259513b9efa4..138311222d1a4b9b6d801cae99aad5bf830b4734 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
 static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
 static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;
index 2bb5dcb5db8021509627e1c09ce5dde67f4a1775..215b45bff8076b6c34c35164e8cce9efe2da5f94 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/efi/efi.h>
 #include <grub/command.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define ADD_MEMORY_DESCRIPTOR(desc, size)      \
   ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
 
index aa3e05aee877dd68a19df6e030b2d600184fdd36..b2359253adc52487b16b2877895d26ef1581895c 100644 (file)
  */
 #include <grub/types.h>
 #include <grub/mm.h>
+#include <grub/dl.h>
 #include <grub/misc.h>
 #include <grub/normal.h>
 #include <grub/charset.h>
 #include <grub/efi/api.h>
 #include <grub/efi/efi.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 struct guid_mapping
 {
   grub_efi_guid_t guid;
index 2ee99303340d6bb1640f62394e3d6845d59a1620..fa8005b88060250b92582b5b43d701dfbffd1276 100644 (file)
@@ -23,6 +23,9 @@
 #include <grub/charset.h>
 #include <grub/efi/api.h>
 #include <grub/efi/efi.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 static void
 disp_sal (void *table)
index e9274fbab412ea9b12cdcc4c958db4c2d2ee5895..69574e2b05b90f84b9d6d8855ede15178fa2f8b2 100644 (file)
@@ -22,6 +22,9 @@
 #include <grub/misc.h>
 #include <grub/extcmd.h>
 #include <grub/script_sh.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 grub_err_t
 grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
index 6364c13f77c4f3a48ab5f1198d647993bbd38ff6..e92dc20ec558b077116fcf0874ced7fd4cbc83d7 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/fs.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Convert a LBA address to a CHS address in the INT 13 format.  */
 /* Taken from grub1. */
 /* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63.
index 3400115a0b81f5371f4d609a0aa10f068cbbe8e9..317f7753fd8779f639854ef0d6b3b16b8214a89e 100644 (file)
@@ -22,6 +22,8 @@
 #include <grub/misc.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
               int argc __attribute__ ((unused)),
index 664fe9c247c6fd02ad487ff508738f488a362110..6825d481168f3969b101ab4bb69e5eb5385d99a1 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/normal.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] = {
   {"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING},
   {"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING},
index b6ab7875516c24b12a16ccdfd0df94e4728bce18..0c12b8814bf6ea6bd7a828c417ef6a04e92850a6 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] = {
   {"apm",             'B', 0, N_("Set Advanced Power Management\n"
                              "(1=low, ..., 254=high, 255=off)."),
index ff6d7ed2e783e2e85e87a4bf037237f46850ddbb..82f3200c71d0257d6b26babfa726cd31c12c6b32 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/normal.h>
 #include <grub/charset.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
               char **args)
index 629f2a0695d0d75cf5ef45b47789a7b2cf7b3042..9ba83598a866a34704c5ce774ceb97b62b90528a 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] = {
   {"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0,
    ARG_TYPE_INT},
index 994da11b00fce887fc0cbad4c7b7f4502b8b3dc9..c79bd03876fbd26602c8ad9eecf0abc4a9437d4b 100644 (file)
@@ -21,6 +21,8 @@
 #include <grub/misc.h>
 #include <grub/cmos.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 parse_args (int argc, char *argv[], int *byte, int *bit)
 {
index f5f0f15a8c73a9f8aa0185301af3e7ee3457146b..6a771ba74fd60a42c890f1a266d61e2e3d2af407 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/i386/cpuid.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define cpuid(num,a,b,c,d) \
   asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
                : "=a" (a), "=r" (b), "=c" (c), "=d" (d)  \
index ed4211ccad8b78ded4b833332016ee079197daa6..c9c8881b4ef1eab8b1cbfa94caaa85819122d8a8 100644 (file)
@@ -29,6 +29,7 @@
 #include <grub/memory.h>
 #include <grub/machine/memory.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
 
 /* Real mode IVT slot (seg:off far pointer) for interrupt 0x13.  */
 static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13);
index 81eb6a1bb0fcb8d8de1912d6fa9554a2a8d49b8d..e7c191de3f387ff81886b7c7469898941f560b55 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/machine/int.h>
 #include <grub/acpi.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0},
index 30475d2ecbe62589f201b4ae644e76a3ab565990..17bcfd6eb80d48d0cfcc2a7efbd4936117184432 100644 (file)
@@ -22,6 +22,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 int
 grub_apm_get_info (struct grub_apm_info *info)
 {
index 4ed937d4a5b82b7d0b8df764b2ed6c16e9f5d315..57980eb920a24a24b4bb203cfe0c99392540115b 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
 
 /* The speaker port.  */
index b576a8ea4f5dadb2899e82f20f04f785f6477569..dffa15a3a6d67aa33e15f06bf156a6dc06c077e6 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_pxe_unload (grub_command_t cmd __attribute__ ((unused)),
                     int argc __attribute__ ((unused)),
index c777ea60ac76be4ea31c41382e75b02982dd84a3..a55d17bd0148664fad65e5c8293307e5491144c6 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/cpu/io.h>
 #include <grub/loader.h>
 
+GRUB_MOD_LICENSE ("GPLv2+");
+
 static char sendkey[0x20];
 /* Length of sendkey.  */
 static int keylen = 0;
index f096cc9baec7f77b9f932a9cade72792b5f26c99..de068951d94bee2e3bc48fa41faac91716328649 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)),
                  int argc __attribute__ ((unused)),
index 20d203e9222c4734dae353bde567bc0398064e36..e7035b528d38adca0bf19b0aede6f7705ccd4a3f 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/cpu/io.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
 static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
 
index deb482a850c6f2b81a7b0b7fdb4dc811e2acc7ef..6c5913a54a980502d58800ee70106d6a7cea09de 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/i18n.h>
 #include <grub/file.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static struct grub_keyboard_layout layout_us = {
   .keyboard_map = {
     /* Keyboard errors. Handled by driver.  */
index 9e1486c9d3de3f9bcef25bc2fb7d67d5dce1963c..f3a66994258588859d845cf08d382fd35027eceb 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/term.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {"shift", 's', 0, N_("Check Shift key."), 0, 0},
index 23c1c1908db6fd0c694d7ac8e7c96978f79d68e0..e68b3315a3d4be58af2a74a5f8a4199c175b5e15 100644 (file)
@@ -33,6 +33,8 @@
 #include <grub/disk.h>
 #include <grub/partition.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 legacy_file (const char *filename)
 {
index 38b3a84c673dd88aa800cd987b1e6f8dcb9c1ccb..5d53a8e662c5b04431cd439a0c004207f2b7040e 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME},
index 481d17db050386432f75015e25154504da976e3b..5fc648a9b6fa3f79faf04498696ce4dc28336b0a 100644 (file)
@@ -32,6 +32,8 @@
 #include <grub/datetime.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {"long", 'l', 0, N_("Show a long list with more detailed information."), 0, 0},
index 64b5596651f66f5f3d6855b8cc688a4ca92ca1a8..fd19e380a79002ed2738f33a3b4fe8fd093d7c57 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/i18n.h>
 #include <grub/dl.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static void
 print_strn (grub_uint8_t *str, grub_size_t len)
 {
index 657f81387bf45ddc9e626436a60624a8fdc005c8..44598f0df3624b839063e874578fac32490fe99b 100644 (file)
@@ -22,6 +22,8 @@
 #include <grub/i18n.h>
 #include <grub/memory.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const char *names[] =
   {
     [GRUB_MEMORY_AVAILABLE] = "available", 
index fd2d4eaf22b4c4525329ec6921d95606e3c55328..03541df6c275441f45127b4e5c6b264bde19a32f 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 struct grub_pci_classname
 {
   int class;
index 28aac7d811cedd77d42460a5992cafe690e7c02f..3b51189d6def543ef069b0f02933403056e74c10 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/env.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
 static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
 
index 5cf109fde7fab36dc9d97e817fcdd6b40434d610..c7d1ec4f5c7bab560653e38bea4cc4942f6221df 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* cat FILE */
 static grub_err_t
 grub_mini_cmd_cat (struct grub_command *cmd __attribute__ ((unused)),
index 539cda34ce0322f9d8f87a1f182ea31bc42d830a..c1c5e2ef7e0adebc8eb7a17281431d15257bcd3a 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/command.h>
 #include <grub/cs5536.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_lsspd (grub_command_t cmd __attribute__ ((unused)),
                int argc __attribute__ ((unused)),
index 31e7685537647a0aab07a8bf3a3b7d094e02bd92..a542861619bc6839b108710bb9494a185b30d292 100644 (file)
@@ -31,6 +31,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv2+");
+
 static struct grub_parttool *parts = 0;
 static int curhandle = 0;
 static grub_dl_t mymod;
index db5951cbb20eaaab333f38a9c8a0f112b58c63fc..8821607b801d37f32092f3411237eb35981fb21e 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/dl.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_dl_t my_mod;
 
 static grub_err_t
index 6886987da83bd24b20588e36d522e264532a836c..05a627219b15a16d7f1255fcc1326be433403174 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/dl.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_dl_t my_mod;
 
 struct pbkdf2_password
index 3ace596d8ca2e41d0e73ff4afa2a8f62bdef84c9..c5f9463408d84f561fc700e5bc3bf3b41346127c 100644 (file)
@@ -32,6 +32,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {"set",             's', 0,
index 6a187fc3e4d573b6f40abe7321ccc0801dfcbcc7..fe3e88b1517ae71653b26c1053a23c32e8030c81 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static char *
 grub_getline (void)
 {
index eedd53c91771e55d25d0adb38bd1ac8e8603fde5..8e18083c0247a60255a3d1727c08ac64677198e9 100644 (file)
@@ -22,6 +22,8 @@
 #include <grub/misc.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)),
                 int argc __attribute__ ((unused)),
index 83c0d8d43bf9df4ef6d71b4c09662c93f313ad8b..1e8a6f309791c55f998f0f2fa3697d50ee4d6723 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/script_sh.h>
 #include <regex.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     { "set", 's', GRUB_ARG_OPTION_REPEATABLE,
index f265f86d62c8a9e5ba0cf16ada3d363a35ddd764..ba80d80ef23997279d531f35ba0d0d75e5ea6b63 100644 (file)
@@ -31,6 +31,8 @@
 #include <grub/disk.h>
 #include <grub/partition.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 void
 FUNC_NAME (const char *key, const char *var, int no_floppy,
           char **hints, unsigned nhints)
index 80741d7abe0c9bfbf5659ca07e77af8a17cbc033..7b0a99565cf1f51e2c127ff07cc369a7f98f9e3e 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/search.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {"file",           'f', 0, N_("Search devices by a file."), 0, 0},
index 88dfa4c08d529175efdb5df588b7099d1a55a5b9..70f5bcdad9113b8d04417215bcd3001a915ff3aa 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/mm.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 struct pci_register
 {
   const char *name;
index da642fcd94aca9fcd4595341ece0a4cf2dd7eaf4..97e7a40a63bfadbaecbaf550f9a67efdfb55d4de 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const struct grub_arg_option options[] =
   {
     {"verbose", 'v', 0, N_("Verbose countdown."), 0, 0},
index c2d9550f6081e55996972307c307196c933eb9d6..0adfd3d2e8438c3cf07e57443cddad84fb11c806 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/i18n.h>
 #include <grub/misc.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 struct grub_term_autoload *grub_term_input_autoload = NULL;
 struct grub_term_autoload *grub_term_output_autoload = NULL;
 
index e981c945a7dff3392405607a76452252ae10711b..50d5aba5e58f4ecbafacd9fbd535ee5d1c8e7a2e 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* A simple implementation for signed numbers. */
 static int
 grub_strtosl (char *arg, char **end, int base)
index 86b8a92530883ffd0fbc99caf6540967c8f6dc1c..fe06f3d1e386125fa7d19ae30271108ce26bf2d7 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_testload (struct grub_command *cmd __attribute__ ((unused)),
                   int argc, char *argv[])
index aa812585380025ca43ec0da56fe723fe23318657..82775e7ef7ae9731d26812ec61e973e0747dc23e 100644 (file)
@@ -21,6 +21,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_true (struct grub_command *cmd __attribute__ ((unused)),
               int argc __attribute__ ((unused)),
index 7f00c8856168b57b38cb9ed46cda39d8e4ab5217..4a051ad1febc3850a777071ab42c31e5b4a412aa 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static const char *usb_classes[] =
   {
     "Unknown",
index 10f77915bf7bc020f6375d890fcebe57f2d20211..3e0c1a12e3a1b43a0364fbd69e32cf8df1086c92 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static unsigned height, width, depth; 
 
 static int
index 435ac29377501dd7d3b6269ad421d59e2ae770c6..dc7a6485f98320a7e7a812d7a27139e8646462d6 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/gfxmenu_view.h>
 #include <grub/env.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
                     int argc, char **args)
index 382d3196b779db4eba0dfa58572315f064d850c5..f618b4ec027d65dee370c7bd0db98b4fa14b20dc 100644 (file)
@@ -34,6 +34,8 @@
 #include <grub/i18n.h>
 #include <grub/crypto.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* This prefix is used by xnu and boot-132 to hash
    together with volume serial. */
 static grub_uint8_t hash_prefix[16]
index fe677e2a02412cab69f18e565ab122078bbd6baa..7f261560d579fd106c482287a05d8c03c5992854 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/scsi.h>
 #include <grub/cs5536.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* At the moment, only two IDE ports are supported.  */
 static const grub_port_t grub_ata_ioaddress[] = { GRUB_ATA_CH0_PORT1,
                                                  GRUB_ATA_CH1_PORT1 };
index f52725a49fd3dffca2d6acecedbb4d8aed27fe03..eb9cb5f853ab587e13a60bb302a71451f2206414 100644 (file)
@@ -22,6 +22,7 @@
 #include <grub/dl.h>
 #include <grub/mm.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
 
 /* ATA pass through support, used by hdparm.mod.  */
 static grub_err_t
index d3f45935c0f3bdfb8a82dbff1e2e1f2a749f0149..154193eb0372ff0898e4e8c4d1f34290354618af 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/misc.h>
 #include <grub/raid.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define NV_SIGNATURES          4
 
 #define NV_IDLE                        0
index 069bb0b595bce99297d270c0490fadff48ea0bab..1d47dc727c96816f722c8e10a535a1ecbe0d79a2 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/err.h>
 #include <grub/term.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static int cd_drive = 0;
 static int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap);
 
index a2c717cdb5603bf02cae2adafe76c7eff57f73ce..e9450167e9fd220de8ee05de96531728f84d3902 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/dl.h>
 #include <grub/ieee1275/ieee1275.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 struct grub_nand_data
 {
   grub_ieee1275_ihandle_t handle;
index 939043f017831e9cacba3e18c06e0ea4407f3aea..d50f353b150cea8e6bb6b031063264ef50853a1c 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 struct grub_loopback
 {
   char *devname;
index 00c6d8f9b72d3c0ebff655bb3e3b43169208b920..206e3e22095a6db816566fc1d9ff684c5feac39e 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/emu/misc.h>
 #endif
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static struct grub_lvm_vg *vg_list;
 static int lv_count;
 
index e308783651bc633f34a5f5dfb3547a5f90968e37..19c43f45593568176bd5e286d7a2350e462f31d7 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/misc.h>
 #include <grub/raid.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Linux RAID on disk structures and constants,
    copied from include/linux/raid/md_p.h.  */
 
index 06d3498a8f13c41075da0a27f5e76ef124cf8a69..691d100b893ea533882a03da502ba7ae7c8fb735 100644 (file)
@@ -27,6 +27,8 @@
 /* Linux RAID on disk structures and constants,
    copied from include/linux/raid/md_p.h.  */
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define RESERVED_BYTES                 (64 * 1024)
 #define RESERVED_SECTORS               (RESERVED_BYTES / 512)
 
index e00280dd7bfd92cffcc6ae566ae73ee40fe0099c..114ac0d9edad27522c0c0ebc747b54fcf0dad7e4 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/mm.h>
 #include <grub/types.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static char *memdisk_addr;
 static grub_off_t memdisk_size = 0;
 
index ac2b9fefe1412827dafdb03dc5066e86cbf4fcc4..3c74bba99d645dd7172031120b51b526117f89e1 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/util/misc.h>
 #endif
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Linked list of RAID arrays. */
 static struct grub_raid_array *array_list;
 grub_raid5_recover_func_t grub_raid5_recover_func;
index 349eb0291d081d4e78914bf7a1c905307242a4d1..c26d05e94f273135e3d3d1629449dd6f0611fc23 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/misc.h>
 #include <grub/raid.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_raid5_recover (struct grub_raid_array *array, int disknr,
                     char *buf, grub_disk_addr_t sector, int size)
index dfaa60ea4d1126b4bfdc83c472c6580f54430209..25b50eb6b5d4024c374d9f80f36a5f734397f28d 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/misc.h>
 #include <grub/raid.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_uint8_t raid6_table1[256][256];
 static grub_uint8_t raid6_table2[256][256];
 
index a40de278f899aff4a9979cf50b582be472a76f03..25f0e3aea25a6b9a1c428b3e225ba5f9a8a9ebf2 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/scsicmd.h>
 #include <grub/time.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 \f
 static grub_scsi_dev_t grub_scsi_dev_list;
 
index fcfe9e5d40c8cda11166bfc07250acd84538b83c..2f1dbd487da3336d1c25c6d7a7f38c04cd788f5e 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/scsicmd.h>
 #include <grub/misc.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_USBMS_DIRECTION_BIT       7
 
 /* The USB Mass Storage Command Block Wrapper.  */
index da813b00d72a9a2f49da496a575aea1e492856c4..772db29561b2b6b832adb0be890d8dc82cf94bfe 100644 (file)
@@ -32,6 +32,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* System table. Two version depending on mode */
 grub_efi_system_table32_t *grub_efiemu_system_table32 = 0;
 grub_efi_system_table64_t *grub_efiemu_system_table64 = 0;
index b5ec43bb28eae543be78bafcf1bb2b6015a5495d..ef6caf77bb2d5046f073d47441f62f0ae06bb777 100644 (file)
@@ -30,6 +30,8 @@
 #include <grub/unicode.h>
 #include <grub/fontformat.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifdef USE_ASCII_FAILBACK
 #include "ascii.h"
 #endif
index 40be4b2f61c7671339ba89db6b336ac817967ef2..1c4f80ec0380148b08642aea9f78089d7c86350a 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/types.h>
 #include <grub/fshelp.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* The affs bootblock.  */
 struct grub_affs_bblock
 {
index cd61f4db9b71adc2e9d84aece8b37e5356a538b5..35ef49937361e5e7f9b315fb1180d9cf06849669 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/types.h>
 #include <grub/fshelp.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifdef MODE_BIGENDIAN
 #define GRUB_AFS_FSNAME_SUFFIX "_be"
 #else
index 11b8dba33c9b9317f84a2868b931697a6cfc759d..3e73837d9d9252c738397053fe3352883fe96f91 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/dl.h>
 #include <grub/types.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define BTRFS_SIGNATURE "_BHRfS_M"
 
 struct btrfs_superblock
index 2c92404c348986d6ae0104d9c8afc05f0e9fc7a2..a7ccfbded2de4383419b107888c0c024a447533a 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/disk.h>
 #include <grub/dl.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifndef MODE_USTAR
 /* cpio support */
 #define        MAGIC_BCPIO     070707
index 9d7bbfd36229305c874ae7f692dc486f48a22ef8..0fdf151a2f90acb4fa8d4134ba1c4c1442d805b5 100644 (file)
@@ -51,6 +51,8 @@
 #include <grub/types.h>
 #include <grub/fshelp.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Log2 size of ext2 block in 512 blocks.  */
 #define LOG2_EXT2_BLOCK_SIZE(data)                     \
        (grub_le_to_cpu32 (data->sblock.log2_block_size) + 1)
index 89050943ccaf7bab6383a6c4de8803e71f603ad9..76b9c52d7811848dda751e3a1c3190f82fc19cef 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/dl.h>
 #include <grub/charset.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_FAT_DIR_ENTRY_SIZE        32
 
 #define GRUB_FAT_ATTR_READ_ONLY        0x01
index d0b1e493e711250378cf60208e4fb940c3acbd1c..f879885acd8758173d2fe88fa5169dd1909df915 100644 (file)
@@ -22,7 +22,9 @@
 #include <grub/misc.h>
 #include <grub/disk.h>
 #include <grub/fshelp.h>
+#include <grub/dl.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
 
 /* Lookup the node PATH.  The node ROOTNODE describes the root of the
    directory tree.  The node found is returned in FOUNDNODE, which is
index cef856326948a625ad96a08ba0f449f35578a94c..1f67ea1552e1a01d2d86daa59e1ebeb80db406bf 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/types.h>
 #include <grub/hfs.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define        GRUB_HFS_SBLOCK         2
 #define GRUB_HFS_EMBED_HFSPLUS_SIG 0x482B
 
index 7d7115ce36efac468601febc69ce777545d6b984..304b321262b550aebd5d272baa02c2cdf83d95a6 100644 (file)
@@ -30,6 +30,8 @@
 #include <grub/hfs.h>
 #include <grub/charset.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_HFSPLUS_MAGIC 0x482B
 #define GRUB_HFSPLUSX_MAGIC 0x4858
 #define GRUB_HFSPLUS_SBLOCK 2
index c800ea2ad01d1986b9e87f4c32a31666f9733620..d6dc2c22d6a1c89223189e364dea74a157083c28 100644 (file)
@@ -30,6 +30,8 @@
 #include <grub/machine/int.h>
 #include <grub/machine/memory.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define SEGMENT(x)     ((x) >> 4)
 #define OFFSET(x)      ((x) & 0xF)
 #define SEGOFS(x)      ((SEGMENT(x) << 16) + OFFSET(x))
index f72249d2094c21f988229f320cef812939619c26..a9a17fef8ef79d611c0da5d553947758b78c7814 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/fshelp.h>
 #include <grub/charset.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_ISO9660_FSTYPE_DIR                0040000
 #define GRUB_ISO9660_FSTYPE_REG                0100000
 #define GRUB_ISO9660_FSTYPE_SYMLINK    0120000
index 6857c4a2cdd4c846dc737a55c146417b22b41b1c..72e6adc74f58081d0757d51836e39751acfabc8f 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/types.h>
 #include <grub/charset.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_JFS_MAX_SYMLNK_CNT        8
 #define GRUB_JFS_FILETYPE_MASK 0170000
 #define GRUB_JFS_FILETYPE_REG  0100000
index 679e1ec510ffbe36853945a6e1d4bad7b21dafd3..523e6e6166ef2815bc7937510d0ba9b27beaa660 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/dl.h>
 #include <grub/types.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifdef MODE_MINIX2
 #define GRUB_MINIX_MAGIC       0x2468
 #define GRUB_MINIX_MAGIC_30    0x2478
index e529775f42d56449802696cea75a4f0ebd3fd99f..4c8d7633cdb7fff4d7fe8a5bd34987a8458053cb 100644 (file)
@@ -35,6 +35,8 @@
 #include <grub/types.h>
 #include <grub/fshelp.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define NILFS_INODE_BMAP_SIZE  7
 
 #define NILFS_SUPORT_REV       2
index 414f6513d9450b5aac07299e7a388f43a54cc795..e01ce34c2c89a571c4594e4ab0d145e68e729224 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/ntfs.h>
 #include <grub/charset.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_dl_t my_mod;
 
 ntfscomp_func_t grub_ntfscomp_func;
index c29979edc41115237a23e4edb4fa5fd4ec095a4e..d2893cb9971237bb30c54a5d598c8e965dae8ff8 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/fshelp.h>
 #include <grub/ntfs.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 decomp_nextvcn (struct grub_ntfs_comp *cc)
 {
index e922795540a8e926f76ba2ac6fce949866c40d72..f2984f845bc3bf70b96190148ef3bcbad77e39c5 100644 (file)
@@ -39,6 +39,8 @@
 #include <grub/types.h>
 #include <grub/fshelp.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define MIN(a, b) \
   ({ typeof (a) _a = (a); \
      typeof (b) _b = (b); \
index b49420de12871afa61a4761bddfa3f34736bf493..455743117731c1d1ab21cdd4e9e9b2a30cc433d5 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/types.h>
 #include <grub/fshelp.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* The common header for a block.  */
 struct grub_sfs_bheader
 {
index 1672aab1be085f823a232760d2b021b1b2af922b..5842d5d1292291abd3d4fdb92177af67989fcc94 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/fshelp.h>
 #include <grub/charset.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_UDF_MAX_PDS               2
 #define GRUB_UDF_MAX_PMS               6
 
index 2b1021db65a3587d38a60872d69166a66fd18b20..86fe8af65e169070cce05bd3040c693de9738070 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/dl.h>
 #include <grub/types.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifdef MODE_UFS2
 #define GRUB_UFS_MAGIC         0x19540119
 #else
index 9f8dc28def6ebc5fdbf1aa79e4f0788ca378f554..2eadc37681a2337852e14d942ba00d7bb9642534 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/types.h>
 #include <grub/fshelp.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define        XFS_INODE_EXTENTS       9
 
 #define XFS_INODE_FORMAT_INO   1
index 8e83ea0b51426ef63cb6f76c38557053ee45e076..8d86cf9e5a8e35674db43d2b2173b80878f0dc9e 100644 (file)
@@ -52,6 +52,8 @@
 #include <grub/zfs/dsl_dir.h>
 #include <grub/zfs/dsl_dataset.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define        ZPOOL_PROP_BOOTFS               "bootfs"
 
 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
index 224a97792a3bcdac2723926ed8632b674b862ab2..1968ed554eb78db2f4f5c826d390a968cefd03ea 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/dl.h>
 #include <grub/env.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static inline void
 print_tabs (int n)
 {
index bef2b083cb06f356ab2fe6d3e25cb8eec9cfeff4..8c039570d421c23c37f5bc73be2d5b13fa6dbc8d 100644 (file)
@@ -30,6 +30,14 @@ main (int argc __attribute__ ((unused)),
   int i;
 
   printf ("#include <grub/types.h>\n");
+  printf ("#include <grub/dl.h>\n");
+  printf ("\n");
+
+  printf ("/* Under copyright legislature such automated output isn't\n");
+  printf ("covered by any copyright. Hence it's public domain. Public\n");
+  printf ("domain works can be dual-licenced with any license. */\n");
+  printf ("GRUB_MOD_LICENSE (\"GPLv3+\");");
+  printf ("GRUB_MOD_DUAL_LICENSE (\"Public Domain\");");
 
 #define TAB(op) \
   printf ("grub_int16_t grub_trig_" #op "tab[] =\n{"); \
index 84937f19bfe72325b9248abb8e6a17df46d9adda..cca8b901fcc253306a9e7205b08f395efa2c440b 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/kernel.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /*
    .mo file information from:
    http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html .
index 564a87634d79a232c0b1a700ecf87d2f913dcbcb..2f210e02baf26b758ab6460211ca906c3099d3ca 100644 (file)
@@ -37,6 +37,8 @@
 #include <grub/gfxmenu_view.h>
 #include <grub/time.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_gfxmenu_view_t cached_view;
 
 static void 
index ba0eebee728f9690d90477599680ccb134d24ce4..4c2243f64bd479675ed4bca529a7c4570fcbe837 100644 (file)
@@ -19,6 +19,9 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
 
 #include <config.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 /* Make sure noone compiles this code with a C++ compiler.  */
 #if defined __cplusplus && defined _LIBC
index 77c4c96b1f110b475ade66511fd2cb188bd92a68..2c9e90f7257bdd271599014d14a8dee17bd94b8d 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 grub_cmd_hello (grub_extcmd_context_t ctxt __attribute__ ((unused)),
                int argc __attribute__ ((unused)),
index d855311d3a86bdeafc38e65f62caaeaa5ed3848b..f64fac0744d1fbd390fd0e42f7ba45c5a0d66910 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/normal.h>
 #include <grub/datetime.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static char *grub_datetime_names[] =
 {
   "YEAR",
index 891fb78e9226d356d64218e1142d28d9982a3491..3b456c1d27def6153569090e5ff44164eb1a3a9b 100644 (file)
@@ -23,6 +23,9 @@
 #include <grub/misc.h>
 #include <grub/fs.h>
 #include <grub/bufio.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 #define GRUB_BUFIO_DEF_SIZE    8192
 #define GRUB_BUFIO_MAX_SIZE    1048576
index 47df23833af184469ecba004f403d558116486b7..ad185dcab1157396ce2646afde48baafbbece12d 100644 (file)
@@ -42,6 +42,8 @@
 #include <grub/file.h>
 #include <grub/dl.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /*
  *  Window Size
  *
index 3daf6a3fe6ce4cd9d5257394361192e5fd32d4f0..1f42cd242ce2e38445de8225140f70ea6d59ec81 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/fs.h>
 #include <grub/dl.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #include "xz.h"
 #include "xz_stream.h"
 
index 02d785b9b94d196c4c183ae419b61e8eefb87040..c5e2888cd92ae51bf12f695ab386b31de0a411ae 100644 (file)
@@ -373,6 +373,38 @@ grub_dl_call_init (grub_dl_t mod)
     (mod->init) (mod);
 }
 
+/* Me, Vladimir Serbinenko, hereby I add this module check as per new
+   GNU module policy. Note that this license check is informative only.
+   Modules have to be licensed under GPLv3 or GPLv3+ (optionally
+   multi-licensed under other licences as well) independently of the
+   presence of this check and solely by linking (module loading in GRUB
+   constitutes linking) and GRUB core being licensed under GPLv3+.
+   Be sure to understand your license obligations.
+*/
+static grub_err_t
+grub_dl_check_license (Elf_Ehdr *e)
+{
+  Elf_Shdr *s;
+  const char *str;
+  unsigned i;
+
+  s = (Elf_Shdr *) ((char *) e + e->e_shoff + e->e_shstrndx * e->e_shentsize);
+  str = (char *) e + s->sh_offset;
+
+  for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+       i < e->e_shnum;
+       i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+    if (grub_strcmp (str + s->sh_name, ".module_license") == 0)
+      {
+       if (grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3") == 0
+           || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3+") == 0
+           || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0)
+         return GRUB_ERR_NONE;
+      }
+
+  return grub_error (GRUB_ERR_BAD_MODULE, "incompatible license");
+}
+
 static grub_err_t
 grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
 {
@@ -519,7 +551,16 @@ grub_dl_load_core (void *addr, grub_size_t size)
   mod->ref_count = 1;
 
   grub_dprintf ("modules", "relocating to %p\n", mod);
-  if (grub_dl_resolve_name (mod, e)
+  /* Me, Vladimir Serbinenko, hereby I add this module check as per new
+     GNU module policy. Note that this license check is informative only.
+     Modules have to be licensed under GPLv3 or GPLv3+ (optionally
+     multi-licensed under other licences as well) independently of the
+     presence of this check and solely by linking (module loading in GRUB
+     constitutes linking) and GRUB core being licensed under GPLv3+.
+     Be sure to understand your license obligations.
+  */
+  if (grub_dl_check_license (e)
+      || grub_dl_resolve_name (mod, e)
       || grub_dl_resolve_dependencies (mod, e)
       || grub_dl_load_segments (mod, e)
       || grub_dl_resolve_symbols (mod, e)
index 56218b4e4615f99cd11fba0c2596bf3ec111eb21..9c7b8cec24e0fa32a2634b7f607e66b5e4e6a87e 100644 (file)
@@ -23,6 +23,9 @@
 #include <grub/file.h>
 #include <grub/misc.h>
 #include <grub/mm.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 /* Check if EHDR is a valid ELF header.  */
 static grub_err_t
index 8db60b48cc5da536ad6e00e460003928e2b1780c..73c5a03c0e4df2615b921d55e54dab6a0a8c6ae2 100644 (file)
@@ -19,6 +19,9 @@
 
 #include <grub/datetime.h>
 #include <grub/cmos.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 grub_err_t
 grub_get_datetime (struct grub_datetime *datetime)
index f5768b8b5e6a3522e767ee5cf8d71258cd74a744..ad1bfc4d38cdb33c26bb686bb0d906ed2ede2282 100644 (file)
@@ -21,6 +21,9 @@
 #include <grub/misc.h>
 #include <grub/mm.h>
 #include <grub/term.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 struct grub_crypto_hmac_handle
 {
index 083446ab9ddecfe6882dc4be63a1f06c0476a71f..09b8c7360dcb4ca9dc88de95ca5380f6da1343a5 100644 (file)
@@ -21,6 +21,9 @@
 #include <grub/crypto.h>
 #include <grub/mm.h>
 #include <grub/misc.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv2+");
 
 /* Implement PKCS#5 PBKDF2 as per RFC 2898.  The PRF to use is HMAC variant
    of digest supplied by MD.  Inputs are the password P of length PLEN,
index 3642de9dc639708dc97212982d892370229a639d..6eb20b865c8aee485901cd2abb67cff60193daa8 100644 (file)
@@ -22,6 +22,9 @@
 #include <grub/misc.h>
 #include <grub/cache.h>
 #include <grub/memory.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 struct grub_relocator
 {
index 611960f9274e43fa8530c3cbcce2605f4e72fc9c..69bf6e6adb9efdb7bc3af692f7cd024741ca6544 100644 (file)
@@ -21,6 +21,8 @@
 #include <grub/misc.h>
 #include <grub/aout.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 int
 grub_aout_get_type (union grub_aout_header *header)
 {
index dc42683a6536ccffcf5222139e347d948e7ed0e0..847750dc0897f010138229cdaa836cdd81917ca9 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_dl_t my_mod;
 
 static grub_efi_handle_t image_handle;
index a095ad9317b09325c70fc0b587a86f40910c565d..869b64ced674dc20fa1fea85ffe6b37d02b78fb3 100644 (file)
@@ -35,6 +35,8 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_dl_t my_mod;
 
 static grub_efi_physical_address_t address;
index ecd5bd5cd1b8986de7f15189134bf05de67ee8ad..6487dc3df3fdeff5855bdc8ae5fddd7b2e514cb5 100644 (file)
@@ -34,6 +34,8 @@
 #include <grub/i18n.h>
 #include <grub/ns8250.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #include <grub/video.h>
 #ifdef GRUB_MACHINE_PCBIOS
 #include <grub/machine/biosnum.h>
index 0178e2fd48e3b652985b26ef588a23f7f74611bf..241eaa5e760a19d04cefadda48b0e86c2dd06546 100644 (file)
@@ -35,6 +35,8 @@
 #include <grub/i18n.h>
 #include <grub/lib/cmdline.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifdef GRUB_MACHINE_PCBIOS
 #include <grub/i386/pc/vesa_modes_table.h>
 #endif
index fd99c81d583b1a32775be3d4e3491e390be9184e..794316b34aaa97e975ba5c8a59ad0c9e45b43497 100644 (file)
@@ -38,6 +38,8 @@
 #include <grub/video.h>
 #include <grub/mm.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_dl_t my_mod;
 static int boot_drive;
 static void *boot_part_addr;
index 96d00f927195bd16ef56ca2f6a0116e386ff14ca..c6e6b67d1853bbef9c659b4fd3b57a7d7d6243d6 100644 (file)
@@ -36,6 +36,8 @@
 #include <grub/i386/floppy.h>
 #include <grub/lib/cmdline.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_LINUX_CL_OFFSET           0x9000
 #define GRUB_LINUX_CL_END_OFFSET       0x90FF
 
index 0c33a068049de230be23710820b81804bb8029d4..4a08b54f2ea4c89b3ef6b3cda0a2d0f58d7fd8eb 100644 (file)
@@ -33,6 +33,8 @@
 #include <grub/mm.h>
 #include <grub/cpu/relocator.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_dl_t my_mod;
 static struct grub_relocator *rel;
 static grub_uint32_t edx = 0xffffffff;
index 9accfc2705caeb9ca7d0890ed762afc002bcf583..0bf7b1f8e06e284e13cfe77bc33bd63a3ac28272 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/memory.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* For frequencies.  */
 #include <grub/pci.h>
 #include <grub/machine/time.h>
index 4bfc2c191218d59dabfd251e05cd0f6b6719b661..d9e74b3c753e048ec72b84db70bbd9dec3344dec 100644 (file)
@@ -43,6 +43,8 @@
 #include <grub/memory.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifdef GRUB_MACHINE_EFI
 #include <grub/efi/efi.h>
 #endif
index 0cf0eb825b39e46c6e6d9dfe52e0f6b51868e61b..12a3fa9f6afe5cc81c60e71de19ee85e6bb9cad5 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/memory.h>
 #include <grub/lib/cmdline.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define ELF32_LOADMASK (0xc0000000UL)
 #define ELF64_LOADMASK (0xc000000000000000ULL)
 
index a262049a70ec28e868d15d46f2953a24993d886a..8ed61f8bf9889b6e9c64a7677b1ca83d50f41ea6 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/memory.h>
 #include <grub/lib/cmdline.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_dl_t my_mod;
 
 static int loaded;
index 73158fd1073c000b7e42ce1f92ae11898f434c86..a98d60c20c4788be8e5344ebcd8bf88478d73974 100644 (file)
@@ -34,6 +34,8 @@
 #include <grub/env.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #if defined (__i386) && !defined (GRUB_MACHINE_EFI)
 #include <grub/autoefi.h>
 #endif
index 1c18254903d56c874701cd27e96dfe42286efbd1..07a71336ba5fa4a7f8bc054cd5ba1362241bcf6b 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/dl.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifndef GRUB_MMAP_REGISTER_BY_FIRMWARE
 
 struct grub_mmap_region *grub_mmap_overlays = 0;
index cefb1cb9b167865346f0df5718c6b4a8f76831a3..837fcb960166913786ec337c3dce59b05986c136 100644 (file)
@@ -33,6 +33,8 @@
 #include <grub/charset.h>
 #include <grub/script_sh.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_DEFAULT_HISTORY_SIZE      50
 
 static int nested_level = 0;
index 677ec61d59630d81530659c12013d1f752c39797..9a68ddd92c5b635ab3640ae49476007fc7b89039 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/partition.h>
 #include <grub/acorn_filecore.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define LINUX_NATIVE_MAGIC grub_cpu_to_le32 (0xdeafa1de)
 #define LINUX_SWAP_MAGIC   grub_cpu_to_le32 (0xdeafab1e)
 #define LINUX_MAP_ENTRIES  (512 / 12)
index 1e0f23402872a0b85d1268bf0e0ad51ed0eb165a..f3ba950aa7099ac478034678338ed49f48d58a86 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/partition.h>
 #include <grub/dl.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 struct grub_amiga_rdsk
 {
   /* "RDSK".  */
index e162d18d7d16ff2b0f8b908843841cba74ae6b91..c08cae589255260a97d932a4c630e267dbfe6d90 100644 (file)
@@ -22,6 +22,8 @@
 #include <grub/mm.h>
 #include <grub/partition.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_APPLE_HEADER_MAGIC        0x4552
 #define GRUB_APPLE_PART_MAGIC  0x504D
 
index 4dec3851c352d15f1a35939c6b34ad80ca3d52df..888100aa219d843e87bc78219cb47517bca25752 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/dl.h>
 #include <grub/msdos_partition.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #ifdef GRUB_UTIL
 #include <grub/emu/misc.h>
 #endif
index 7f2c36143bbe95ecd678a85828bce8aaa136922d..73a1c3b195d35d4dbacc80f4fad8a6b7d806b919 100644 (file)
@@ -25,6 +25,8 @@
 #include <grub/msdos_partition.h>
 #include <grub/gpt_partition.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_uint8_t grub_gpt_magic[8] =
   {
     0x45, 0x46, 0x49, 0x20, 0x50, 0x41, 0x52, 0x54
index 31a0a0707642a4d4c2fd82b39a4ddc1d7a2f9ff2..1b71c69abef1b4b4bb5d12ae04ef00717b5f869d 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/misc.h>
 #include <grub/dl.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static struct grub_partition_map grub_msdos_partition_map;
 \f
 
index 7af95c9397a9204059108d00f88b22a29f739c2d..c7ef681c48014d0b07bdcd2bb45cc540e9b0bb5d 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/types.h>
 #include <grub/err.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_PARTMAP_SUN_MAGIC 0xDABE
 #define GRUB_PARTMAP_SUN_MAX_PARTS 8
 #define GRUB_PARTMAP_SUN_WHOLE_DISK_ID 0x05
index ea69c28b9df32c5e67e1a36e44ce28c6bf2a80d8..28dc4f5be4d41710d266859dee932e07330191eb 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/types.h>
 #include <grub/err.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define GRUB_PARTMAP_SUN_PC_MAGIC 0xDABE
 #define GRUB_PARTMAP_SUN_PC_MAX_PARTS 16
 #define GRUB_PARTMAP_SUN_PC_WHOLE_DISK_ID 0x05
index 006a87defb94594c94eb0303ee7ca24e2e1cf5e6..ecaca140ad0415b66386b7c2c3a4fca3a2810b58 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/partition.h>
 #include <grub/parttool.h>
 
+GRUB_MOD_LICENSE ("GPLv2+");
+
 static int activate_table_handle = -1;
 static int type_table_handle = -1;
 
index 7ce287ecc3aab534547c6b0c3c9ab8f4e2742a6e..210ac21ccf9362dad419562c5456f1922cede360 100644 (file)
@@ -26,6 +26,8 @@
 #include <grub/time.h>
 #include <grub/loader.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static short at_keyboard_status = 0;
 static int e0_received = 0;
 static int f0_received = 0;
index 44d1a9be8bacdec048038ffa1c8522b0174a7881..0ade65f2757a27d7ec7412960f0008930b85b737 100644 (file)
@@ -31,6 +31,8 @@
 #include <grub/bitmap_scale.h>
 #include <grub/i18n.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define DEFAULT_VIDEO_MODE     "auto"
 #define DEFAULT_BORDER_WIDTH   10
 
index fbb65ae0cf3023fe6d183bfff59f33eeed6164f1..1816bfae240b89939d456dcf3da14686d43d95c3 100644 (file)
@@ -22,6 +22,8 @@
 #include <grub/types.h>
 #include <grub/vga.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define COLS   80
 #define ROWS   25
 
index 32628dbaede9e9052bfbe9efeb5dc9774b20eeb3..073c27aed8d1bcfeee5aaa5582629829453bdf16 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/i18n.h>
 #include <grub/list.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define FOR_SERIAL_PORTS(var) FOR_LIST_ELEMENTS((var), (grub_serial_ports))
 
 /* Argument options.  */
index 0a8c75c740f3ce8d766030a0084e90789563d458..16158139dc2ff7084e7cb623e65289375ad52ecf 100644 (file)
@@ -34,6 +34,8 @@
 #include <grub/i18n.h>
 #include <grub/time.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static struct grub_term_output *terminfo_outputs;
 
 /* Get current terminfo name.  */
index 23c0c10cabdd3e7e0910beab9cb030ec4ba84f4a..ae00936b8039df05194447200453b0d69df8f8a3 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/time.h>
 #include <grub/keyboard_layouts.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 \f
 
 enum
index 52598814592c18357990bc05c0a38fb7f6b86425..8020887912ab84f380e54b1027e461a8de2d1a65 100644 (file)
@@ -18,6 +18,9 @@
 
 /* All tests need to include test.h for GRUB testing framework.  */
 #include <grub/test.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 /* Functional test main method.  */
 static void
index 521f4ad226db0418f66e0c6f18893bfd79fe356e..fd199bd63848c54511bb8ad1f48e1b1b07d68e3e 100644 (file)
@@ -20,6 +20,9 @@
 #include <grub/misc.h>
 #include <grub/extcmd.h>
 #include <grub/test.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 static grub_err_t
 grub_functional_test (grub_extcmd_context_t ctxt __attribute__ ((unused)),
index 41460fb7e1c80360bfeb58a6b7477d06a7a37cab..ddd46e1f62433c0e1193507bdb362e5e9c4e85d4 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/extcmd.h>
 #include <grub/script_sh.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_err_t
 test_blockarg (grub_extcmd_context_t ctxt, int argc, char **args)
 {
index 659ab9a574f51aff9b55d306711e2535b2ed5aa2..32e9358a34d5b92e43901871afed69c8bd2cb1ce 100644 (file)
@@ -23,6 +23,8 @@
 #include <grub/mm.h>
 #include <grub/misc.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* List of bitmap readers registered to system.  */
 static grub_video_bitmap_reader_t bitmap_readers_list;
 
index 6f8ff247ecfd52949d592c0755d7c33d96a15f9d..8da5697f8e90681787e8312b9e4ce0e3770dd213 100644 (file)
@@ -23,6 +23,9 @@
 #include <grub/bitmap.h>
 #include <grub/bitmap_scale.h>
 #include <grub/types.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 /* Prototypes for module-local functions.  */
 static grub_err_t scale_nn (struct grub_video_bitmap *dst,
index 832cd990311cc14059a61a4049880593fc5c75a0..79cae6547a9d649384ac759b54aadb32e99cd2bd 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/pci.h>
 #include <grub/vga.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static struct
 {
   struct grub_video_mode_info mode_info;
index a964c85cdd795e314197f328a91f56a28da028a0..7fad50e5b8760ebd0f91b0c2203f22b338c69b7e 100644 (file)
@@ -28,6 +28,8 @@
 #include <grub/pci.h>
 #include <grub/vga.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static struct
 {
   struct grub_video_mode_info mode_info;
index f02dc9cb643a2b997f39961b5e80b0c629bfa4e0..d14ae98d2390c87a33a440cee0aa0970c98b8ade 100644 (file)
@@ -29,6 +29,8 @@
 #include <grub/efi/efi.h>
 #include <grub/efi/graphics_output.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_efi_guid_t graphics_output_guid = GRUB_EFI_GOP_GUID;
 static struct grub_efi_gop *gop;
 static unsigned old_mode;
index a8f70edea009dbf782cc3249342a644514fa8d13..1e709a52d01b0202cb7e61c9c818f676a450e59d 100644 (file)
@@ -30,6 +30,8 @@
 #include <grub/efi/uga_draw.h>
 #include <grub/pci.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static grub_efi_guid_t uga_draw_guid = GRUB_EFI_UGA_DRAW_GUID;
 static struct grub_efi_uga_draw_protocol *uga;
 static grub_uint32_t uga_fb;
index d66b8b0c0ff31fc585867f6b5abc372547d4b22f..f4c1a6ab68ba5fe45cb6b4b13bbfd0d8d28a5afb 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/video_fb.h>
 #include <SDL/SDL.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static SDL_Surface *window = 0;
 static struct grub_video_render_target *sdl_render_target;
 static struct grub_video_mode_info mode_info;
index 2226d6583cbe2ad9e9695b466987fd2027ff8011..2cffcb3d93d3ea9cfe2089d34ccb947c29e48abf 100644 (file)
@@ -24,6 +24,9 @@
 #include <grub/fbfill.h>
 #include <grub/fbutil.h>
 #include <grub/bitmap.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
 
 static struct
 {
index 08bf124b6e7b88aeea55c4ac6549ba7f0e3d55c4..a109bcf432361de29d0e7908dbff3a65f6303389 100644 (file)
@@ -30,6 +30,8 @@
 #include <grub/video.h>
 #include <grub/machine/int.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 static int vbe_detected = -1;
 
 static struct grub_vbe_info_block controller_info;
index 19770ce0af225b90c5764175ad5f5d2a366f19fc..fe387a26b9957dd5b64a87357dab222b2ae9ead6 100644 (file)
@@ -30,6 +30,8 @@
 #include <grub/misc.h>
 #include <grub/vga.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 #define VGA_WIDTH      640
 #define VGA_HEIGHT     350
 #define VGA_MEM                ((grub_uint8_t *) GRUB_MEMORY_MACHINE_VGA_ADDR)
index 501ba7c2f38c8a8f4a47610539e9d4efd9fff8d2..913ea8376640f904441d6d36d2477f20315f087d 100644 (file)
@@ -27,6 +27,8 @@
 #include <grub/video_fb.h>
 #include <grub/ieee1275/ieee1275.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Only 8-bit indexed color is supported for now.  */
 
 static unsigned old_width, old_height;
index 9d88163bd2d46045cd5e05307228e086cdd69da6..8cdb2f61d22e0499caabcf4bbe7baff7339661cb 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/misc.h>
 #include <grub/bufio.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Uncomment following define to enable JPEG debug.  */
 //#define JPEG_DEBUG
 
index 2cec49e2f848ec6d1ca2c18a6044431e18ab4b14..5728651e090fa813e10d8378ab2caf289b4b7442 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/misc.h>
 #include <grub/bufio.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Uncomment following define to enable PNG debug.  */
 //#define PNG_DEBUG
 
index 6c9e9d691566c37aa1a0167722a109cd7f80845f..84be68a0a4b9f691c40d5eb7c9a76fefd30b30ad 100644 (file)
@@ -24,6 +24,8 @@
 #include <grub/misc.h>
 #include <grub/bufio.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* Uncomment following define to enable TGA debug.  */
 //#define TGA_DEBUG
 
index 7a1a446e4329bd4cfdcb66631fbf30c06abe7082..6a1d473049b99f2b206cd94dd82810cdb1a3312c 100644 (file)
@@ -22,6 +22,8 @@
 #include <grub/misc.h>
 #include <grub/mm.h>
 
+GRUB_MOD_LICENSE ("GPLv3+");
+
 /* The list of video adapters registered to system.  */
 grub_video_adapter_t grub_video_adapter_list = NULL;
 
index afc4af41aace8077e81a577b3b3f707553b36c3a..71db90c8b79adb2e104ef52ae172958f3516e380 100644 (file)
@@ -63,8 +63,32 @@ __asm__ (".section .modname\n.asciz \"" #name "\"\n")
 
 #define GRUB_MOD_DEP(name)     \
 __asm__ (".section .moddeps\n.asciz \"" #name "\"\n")
+
+#endif
+
+#ifdef APPLE_CC
+#define GRUB_MOD_SECTION(x) "_" x ", _" x ""
+#else
+#define GRUB_MOD_SECTION(x) "." x
 #endif
 
+/* Me, Vladimir Serbinenko, hereby I add this module check as per new
+   GNU module policy. Note that this license check is informative only.
+   Modules have to be licensed under GPLv3 or GPLv3+ (optionally
+   multi-licensed under other licences as well) independently of the
+   presence of this check and solely by linking (module loading in GRUB
+   constitutes linking) and GRUB core being licensed under GPLv3+.
+   Be sure to understand your license obligations.
+*/
+#define GRUB_MOD_LICENSE(license)      \
+  static char grub_module_license[] __attribute__ ((section (GRUB_MOD_SECTION ("module_license")), used)) = "LICENSE=" license;
+
+/* Under GPL license obligations you have to distribute your module
+   under GPLv3(+). However, you can also distribute the same code under
+   another license as long as GPLv3(+) version is provided.
+*/
+#define GRUB_MOD_DUAL_LICENSE(x)
+
 struct grub_dl_segment
 {
   struct grub_dl_segment *next;
index 494a4ae7b64ed36a5aaf389a79d7e69851593725..54c178dbf0b083c51867a5a92c065784dc868ef4 100644 (file)
@@ -91,7 +91,12 @@ for cipher_file in cipher_files:
         f = open (infile, "r")
         fw = open (outfile, "w")
         fw.write ("/* This file was automatically imported with \n")
-        fw.write ("   import_gcry.py. Please don't modify it */\n");
+        fw.write ("   import_gcry.py. Please don't modify it */\n")
+        fw.write ("#include <grub/dl.h>\n")
+        # Whole libgcrypt is distributedunder GPLv3+ or compatible
+        if isc:
+            fw.write ("GRUB_MOD_LICENSE (\"GPLv3+\");\n")
+
         ciphernames = []
         mdnames = []
         hold = False