From af1222be428fc00f0fe795e30ce6ccbcdcb630a4 Mon Sep 17 00:00:00 2001 From: longpanda Date: Wed, 13 May 2020 20:40:37 +0800 Subject: [PATCH] Add missing file: fs.h Add new languages: Bangla - translated by BL4CKH47H4CK3R Romanian - translated by DorinMol Japanese - translated by taichi eto --- GRUB2/grub-2.04/include/grub/fs.h | 132 ++++++++++++++++++++++++++++++ LANGUAGES/languages.ini | Bin 38922 -> 46422 bytes 2 files changed, 132 insertions(+) create mode 100644 GRUB2/grub-2.04/include/grub/fs.h diff --git a/GRUB2/grub-2.04/include/grub/fs.h b/GRUB2/grub-2.04/include/grub/fs.h new file mode 100644 index 00000000..3955faa6 --- /dev/null +++ b/GRUB2/grub-2.04/include/grub/fs.h @@ -0,0 +1,132 @@ +/* fs.h - filesystem manager */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2002,2003,2004,2007,2008,2009 Free Software Foundation, Inc. + * + * GRUB 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 3 of the License, or + * (at your option) any later version. + * + * GRUB 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. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see . + */ + +#ifndef GRUB_FS_HEADER +#define GRUB_FS_HEADER 1 + +#include +#include +#include + +#include +/* For embedding types. */ +#ifdef GRUB_UTIL +#include +#endif + +/* Forward declaration is required, because of mutual reference. */ +struct grub_file; + +struct grub_dirhook_info +{ + unsigned dir:1; + unsigned mtimeset:1; + unsigned case_insensitive:1; + unsigned inodeset:1; + grub_int32_t mtime; + grub_uint64_t inode; + grub_uint64_t size; +}; + +typedef int (*grub_fs_dir_hook_t) (const char *filename, + const struct grub_dirhook_info *info, + void *data); + +/* Filesystem descriptor. */ +struct grub_fs +{ + /* The next filesystem. */ + struct grub_fs *next; + struct grub_fs **prev; + + /* My name. */ + const char *name; + + /* Call HOOK with each file under DIR. */ + grub_err_t (*fs_dir) (grub_device_t device, const char *path, + grub_fs_dir_hook_t hook, void *hook_data); + + /* Open a file named NAME and initialize FILE. */ + grub_err_t (*fs_open) (struct grub_file *file, const char *name); + + /* Read LEN bytes data from FILE into BUF. */ + grub_ssize_t (*fs_read) (struct grub_file *file, char *buf, grub_size_t len); + + /* Close the file FILE. */ + grub_err_t (*fs_close) (struct grub_file *file); + + /* Return the label of the device DEVICE in LABEL. The label is + returned in a grub_malloc'ed buffer and should be freed by the + caller. */ + grub_err_t (*fs_label) (grub_device_t device, char **label); + + /* Return the uuid of the device DEVICE in UUID. The uuid is + returned in a grub_malloc'ed buffer and should be freed by the + caller. */ + grub_err_t (*fs_uuid) (grub_device_t device, char **uuid); + + /* Get writing time of filesystem. */ + grub_err_t (*fs_mtime) (grub_device_t device, grub_int32_t *timebuf); + +#ifdef GRUB_UTIL + /* Determine sectors available for embedding. */ + grub_err_t (*fs_embed) (grub_device_t device, unsigned int *nsectors, + unsigned int max_nsectors, + grub_embed_type_t embed_type, + grub_disk_addr_t **sectors); + + /* Whether this filesystem reserves first sector for DOS-style boot. */ + int reserved_first_sector; + + /* Whether blocklist installs have a chance to work. */ + int blocklist_install; +#endif +}; +typedef struct grub_fs *grub_fs_t; + +/* This is special, because block lists are not files in usual sense. */ +extern struct grub_fs grub_fs_blocklist; + +/* This hook is used to automatically load filesystem modules. + If this hook loads a module, return non-zero. Otherwise return zero. + The newly loaded filesystem is assumed to be inserted into the head of + the linked list GRUB_FS_LIST through the function grub_fs_register. */ +typedef int (*grub_fs_autoload_hook_t) (void); +extern grub_fs_autoload_hook_t EXPORT_VAR(grub_fs_autoload_hook); +extern grub_fs_t EXPORT_VAR (grub_fs_list); + +#ifndef GRUB_LST_GENERATOR +static inline void +grub_fs_register (grub_fs_t fs) +{ + grub_list_push (GRUB_AS_LIST_P (&grub_fs_list), GRUB_AS_LIST (fs)); +} +#endif + +static inline void +grub_fs_unregister (grub_fs_t fs) +{ + grub_list_remove (GRUB_AS_LIST (fs)); +} + +#define FOR_FILESYSTEMS(var) FOR_LIST_ELEMENTS((var), (grub_fs_list)) + +grub_fs_t EXPORT_FUNC(grub_fs_probe) (grub_device_t device); + +#endif /* ! GRUB_FS_HEADER */ diff --git a/LANGUAGES/languages.ini b/LANGUAGES/languages.ini index e19ac4c63ad06e13e47bd774cf15872b3f0108d5..3a92c19dde8231ea0cfdb1790546aec97ccd0d5f 100644 GIT binary patch delta 4432 zcmc&%eN2^A7(ZO@h=ZmUV4xG;tEH%b2c3rY?&(^kLVIrqW^Wvvg_obP?ld7kq;zvuUS z9Nva5*QejPx>_EakSkWWm*L+Mccy!>TdUc-&P}L07Na*!N|>@->=5OmMC`$@BT_`C z?3D*(H=fkf6Y4U@waE`BQw z3NPg#t1U87j z-#BWNouGx01a1JQT_+#(jAv|b!sIh>qc1hiPZ;Tg`0M2>FrZsKYI3-CnCSV6r0GO? z(x4`)G{k44;eHzcwZX#O&g78+g|O;@yOZMTWd{NXAgQ=re^!GHGQ@ z6k?V>mo@u;#^6jvvvrv2dJ5E&_DiNKF38uB-tqHe52Bd*AZiCIr||R$M<1ORyR1i^ zMh;kLjL^1JsO-4DzAP+5Y{~%ZPkWxr@P}&!&?D@o7Sn?4nQnmLPUBF9!iE6$UqX(I zE##S1-2rV@#d_4sa#OEt8&(p%+WKXCzle7hYMb9c4;7zvWjm}MVKJG66Ob1W{Bf*< z$3~r^^G-OnjbTfGg>eigI2vf>7~WV`4n|xB23@-Fi8`UL9&%4%1&2rvxghRhsR!cI z$4bERze>R9<{L#n&0i@^HN9vnIADPGVCGr2ZW`<1^c5q};kLR-tn0x;v58~SjN2qu zJ9i{x4+qR^Bs82@jvSXa9`GDM_8z$~R3Bzm>%n#NZlSbCw(I`G3*u~d*`daI;Z3G< zCQU!rd*Gq?rrB{$J_=*6xd%(lllP$A`wDksWCU));)z*MsuHEx$i~|q{mZ1}aSvjr z0!ONZS07FG#4i)I!i$v;det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