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)  

fatlabel.c File Reference
#include "version.h"
#include <stdbool.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <unistd.h>
#include <getopt.h>
#include <ctype.h>
#include "common.h"
#include "fsck.fat.h"
#include "io.h"
#include "boot.h"
#include "fat.h"
#include "file.h"
#include "check.h"
#include "charconv.h"
Include dependency graph for fatlabel.c:

Go to the source code of this file.

Functions

static void handle_label (bool change, bool reset, const char *device, char *newlabel)
 
static void handle_volid (bool change, bool reset, const char *device, const char *newserial)
 
static void usage (int error, int usage_only)
 
int main (int argc, char *argv[])
 

Variables

int rw = 0
 
int list = 0
 
int test = 0
 
int verbose = 0
 
int no_spaces_in_sfns = 0
 
long fat_table = 0
 
unsigned n_files = 0
 
void * mem_queue = NULL
 

Function Documentation

◆ handle_label()

static void handle_label ( bool  change,
bool  reset,
const char *  device,
char *  newlabel 
)
static

◆ handle_volid()

static void handle_volid ( bool  change,
bool  reset,
const char *  device,
const char *  newserial 
)
static

Definition at line 144 of file fatlabel.c.

References fs_open(), generate_volume_id(), read_boot(), rw, DOS_FS::serial, and write_serial().

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ usage()

static void usage ( int  error,
int  usage_only 
)
static

Definition at line 185 of file fatlabel.c.

References DEFAULT_DOS_CODEPAGE, and error.

Referenced by main().

Variable Documentation

◆ fat_table

long fat_table = 0

Definition at line 50 of file fatlabel.c.

Referenced by read_fat().

◆ list

int list = 0

Definition at line 49 of file fatlabel.c.

Referenced by add_file().

◆ mem_queue

void* mem_queue = NULL

Definition at line 52 of file fatlabel.c.

Referenced by add_file(), and cnv_unicode().

◆ n_files

unsigned n_files = 0

Definition at line 51 of file fatlabel.c.

Referenced by add_file(), alloc_rootdir_entry(), and drop_file().

◆ no_spaces_in_sfns

int no_spaces_in_sfns = 0

Definition at line 49 of file fatlabel.c.

Referenced by bad_name().

◆ rw

int rw = 0

Definition at line 49 of file fatlabel.c.

Referenced by fs_open(), handle_label(), handle_volid(), main(), and update_free().

◆ test

int test = 0

Definition at line 49 of file fatlabel.c.

Referenced by add_file().

◆ verbose

int verbose = 0

Definition at line 49 of file fatlabel.c.

Referenced by fix_bad(), read_boot(), reclaim_file(), reclaim_free(), and update_free().