dosfstools  4.2
About: dosfstools are utilities to create, check and label (MS-DOS) FAT filesystems.
  Fossies Dox: dosfstools-4.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

boot.h
Go to the documentation of this file.
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
void write_label(DOS_FS *fs, char *label)
Definition: boot.c:718
const char * pretty_label(const char *label)
Definition: boot.c:747
off_t find_volume_de(DOS_FS *fs, DIR_ENT *de)
Definition: boot.c:629
void write_volume_label(DOS_FS *fs, char *label)
Definition: boot.c:671
void remove_label(DOS_FS *fs)
Definition: boot.c:729
void read_boot(DOS_FS *fs)
Definition: boot.c:415
off_t alloc_rootdir_entry(DOS_FS *fs, DIR_ENT *de, const char *pattern, int gen_name)
Definition: boot.c:52
void write_serial(DOS_FS *fs, uint32_t serial)
Definition: boot.c:624
void write_boot_label(DOS_FS *fs, const char *label)
Definition: boot.c:619