"Fossies" - the Fresh Open Source Software Archive

Member "dosfstools-4.2/src/boot.h" (31 Jan 2021, 1982 Bytes) of package /linux/misc/dosfstools-4.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "boot.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 4.1_vs_4.2.

    1 /* boot.h - Read and analyze ia PC/MS-DOS boot sector
    2 
    3    Copyright (C) 1993 Werner Almesberger <werner.almesberger@lrc.di.epfl.ch>
    4    Copyright (C) 2008-2014 Daniel Baumann <mail@daniel-baumann.ch>
    5    Copyright (C) 2017 Andreas Bombe <aeb@debian.org>
    6 
    7    This program is free software: you can redistribute it and/or modify
    8    it under the terms of the GNU General Public License as published by
    9    the Free Software Foundation, either version 3 of the License, or
   10    (at your option) any later version.
   11 
   12    This program is distributed in the hope that it will be useful,
   13    but WITHOUT ANY WARRANTY; without even the implied warranty of
   14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   15    GNU General Public License for more details.
   16 
   17    You should have received a copy of the GNU General Public License
   18    along with this program. If not, see <http://www.gnu.org/licenses/>.
   19 
   20    The complete text of the GNU General Public License
   21    can be found in /usr/share/common-licenses/GPL-3 file.
   22 */
   23 
   24 #ifndef _BOOT_H
   25 #define _BOOT_H
   26 
   27 #include <stdint.h>
   28 
   29 void read_boot(DOS_FS * fs);
   30 void write_label(DOS_FS * fs, char *label);
   31 void write_boot_label(DOS_FS * fs, const char *label);
   32 void write_volume_label(DOS_FS * fs, char *label);
   33 void remove_label(DOS_FS *fs);
   34 void write_serial(DOS_FS * fs, uint32_t serial);
   35 off_t find_volume_de(DOS_FS * fs, DIR_ENT * de);
   36 const char *pretty_label(const char *label);
   37 
   38 /* Reads the boot sector from the currently open device and initializes *FS */
   39 
   40 
   41 off_t alloc_rootdir_entry(DOS_FS * fs, DIR_ENT * de, const char *pattern, int gen_name);
   42 
   43 /* Allocate a free slot in the root directory for a new file. If gen_name is
   44    true, the file name is constructed after 'pattern', which must include a %d
   45    type format for printf and expand to exactly 11 characters. The name
   46    actually used is written into the 'de' structure, the rest of *de is cleared.
   47    The offset returned is to where in the filesystem the entry belongs. */
   48 
   49 #endif