Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Finding implementation code in UNIX for FAT16/32 Post 302748175 by jim mcnamara on Monday 24th of December 2012 01:05:44 PM
Old 12-24-2012
Here is one:
FAT16/32 File System Library Ultra-Embedded

Google is your friend - search for 'Linux FAT32 driver source code'

And only Linux and friends like FreeBSD are open source, AIX, HPUX really are not intended to be open source. Oracle cut off Solaris open source at the knees, it is now IllumOS.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to mount fat16 partition

Hello, I am trying to mount a FAT16 and FAT32 partition on an already installed Redhat system. I have tried to edit the fstab and mtab, and to put in the data I got from fdisk, but it just says cannot find it. The information given by fdisk on /dev/hda is: Device Boot Start ... (4 Replies)
Discussion started by: ghoti
4 Replies

2. Shell Programming and Scripting

Writing and executing a script in RTR implementation of UNIX

Can anybody provide a complete procedure for writing and executing a script in RTR(real time reliable) implementation of UNIX (0 Replies)
Discussion started by: mahajan.anubhav
0 Replies

3. Solaris

Finding error code

Hi Guys, Can you tell me how to find error code generated by a command. Say i run a command and its generating an error how do i find out its error code ( i know its done using redirection operator.......but not sure how)? (2 Replies)
Discussion started by: nitinkgoud
2 Replies

4. Programming

C code for implementation of Memory Mapping

Please post a C code for implementation of Memory Mapping function. It should simulate the mmap command. (1 Reply)
Discussion started by: raviviolet13
1 Replies

5. UNIX for Advanced & Expert Users

Finding alternative code

Hi Sir's I've the below piece of code has the following functionalities: 1) Read the "pcp" file and create Job related parameter file "$PARMFILE". $PARMFILE has below variables: AFTD2010 "FILE_TYPE_D=Y export FILE_TYPE_D" AFTD2010 "FILE_TYPE_I=N export FILE_TYPE_I" AFTD2010... (0 Replies)
Discussion started by: Lokesha
0 Replies

6. UNIX for Advanced & Expert Users

implementation of pim and mospf protocole in unix

hello is there any implementation of msopf and pim protocoles in unix? :confused: (1 Reply)
Discussion started by: jalil smail
1 Replies

7. UNIX for Advanced & Expert Users

GPRS Tunnelling Protocol implementation under UNIX

I need to implement a program that sends CDRs (just some data) over GTP' (GTP Prime - one of the GPRS Tunnelling Protocols, http://en.wikipedia.org/wiki/GPRS_Tunnelling_Protocol). Does anybody know where I can find GTP implementation? I'v tryed OpenGGSN (http://sourceforge.net/projects/ggsn/), but... (4 Replies)
Discussion started by: Hitori
4 Replies

8. UNIX and Linux Applications

Need the sample code for implementation of SFTP

Hi we need to implement SFTP through unix shell scripts. I have seen many posts, in which there is discussion about non-interactive,automated SFTP. Can anyone please send me the sample code for SFTP shell script. We are using SFTP to transfer the files from the host server to the target... (10 Replies)
Discussion started by: kumarm
10 Replies

9. UNIX for Dummies Questions & Answers

Hash Table like implementation in unix

Hi all, I just downloaded this example from the net. I was looking around for a hash table like implementation in unix when I came across this. ARRAY=( "cow:moo" "dinosaur:roar" "bird:chirp" "bash:rock" ) for animal in ${ARRAY} ; do KEY=${animal%%:*} ... (8 Replies)
Discussion started by: anindyabecs
8 Replies

10. Shell Programming and Scripting

UNIX time command implementation

I want to know about the time command flow of execution. I have a doubt in the time calculation for the command execution. Whether the real time is sum of (time taken to open the unix window + execute the command given infront of the "time" command + close the unix window) or Just the time... (1 Reply)
Discussion started by: sateesh Solapur
1 Replies
NEWFS_MSDOS(8)						    BSD System Manager's Manual 					    NEWFS_MSDOS(8)

NAME
newfs_msdos -- construct a new MS-DOS (FAT) file system SYNOPSIS
newfs_msdos [-N] [-@ offset] [-B boot] [-C create-size] [-F FAT-type] [-I volid] [-L label] [-O OEM] [-S sector-size] [-a FAT-size] [-b block-size] [-c cluster-size] [-e dirents] [-f format] [-h heads] [-i info] [-k backup] [-m media] [-n FATs] [-o hidden] [-r reserved] [-s total] [-u track-size] special [disktype] DESCRIPTION
The newfs_msdos utility creates a FAT12, FAT16, or FAT32 file system on device or file named special, using disktab(5) entry disktype to determine geometry, if required. The options are as follow: -N Don't create a file system: just print out parameters. -@ offset Build the filesystem at the specified offset in bytes in the device or file. A suffix s, k, m, g (lower or upper case) appended to the offset specifies that the number is in sectors, kilobytes, megabytes or gigabytes, respectively. -B boot Get bootstrap from file. -C create-size Create the image file with the specified size. A suffix character appended to the size is interpreted as for the -@ option. The file is created by truncating any existing file with the same name, seeking just before the required size and writing a single 0 byte. As a consequence, the space occupied on disk may be smaller than the size specified as a parameter. -F FAT-type FAT type (one of 12, 16, or 32). -I volid Volume ID. -L label Volume label (up to 11 characters). The label should consist of only those characters permitted in regular DOS (8+3) filenames. The default is "NO_NAME". -O OEM OEM string (up to 8 characters). The default is "NetBSD". -S sector-size Number of bytes per sector. Acceptable values are powers of 2 in the range 512 through 32768. -a FAT-size Number of sectors per FAT. -b block-size File system block size (bytes per cluster). This should resolve to an acceptable number of sectors per cluster (see below). -c cluster-size Sectors per cluster. Acceptable values are powers of 2 in the range 1 through 128. If the block or cluster size are not specified, the code uses a cluster between 512 bytes and 32K depending on the filesystem size. -e dirents Number of root directory entries (FAT12 and FAT16 only). -f format Specify a standard (floppy disk) format. The standard formats are (capacities in kilobytes): 160, 180, 320, 360, 640, 720, 1200, 1232, 1440, 2880. -h heads Number of drive heads. -i info Location of the file system info sector (FAT32 only). A value of 0xffff signifies no info sector. -k backup Location of the backup boot sector (FAT32 only). A value of 0xffff signifies no backup sector. -m media Media descriptor (acceptable range 0xf0 to 0xff). -n FATs Number of FATs. Acceptable values are 1 to 16 inclusive. The default is 2. -o hidden Number of hidden sectors. -r reserved Number of reserved sectors. -s total File system size. -u track-size Number of sectors per track. If newfs_msdos receives a SIGINFO signal (see the status argument for stty(1)), a line will be written to the standard error output indicat- ing the name of the device currently being formatted, the sector number being written, and the total number of sectors to be written. NOTES
If some parameters (e.g. size, number of sectors, etc.) are not specified through options or disktype, the program tries to generate them automatically. In particular, the size is determined as the device or file size minus the offset specified with the -@ option. When the geometry is not available, it is assumed to be 63 sectors, 255 heads. The size is then rounded to become a multiple of the track size and avoid complaints by some filesystem code. FAT file system parameters occupy a "Boot Sector BPB (BIOS Parameter Block)" in the first of the "reserved" sectors which precede the actual file system. For reference purposes, this structure is presented below. struct bsbpb { u_int16_t bps; /* [-S] bytes per sector */ u_int8_t spc; /* [-c] sectors per cluster */ u_int16_t res; /* [-r] reserved sectors */ u_int8_t nft; /* [-n] number of FATs */ u_int16_t rde; /* [-e] root directory entries */ u_int16_t sec; /* [-s] total sectors */ u_int8_t mid; /* [-m] media descriptor */ u_int16_t spf; /* [-a] sectors per FAT */ u_int16_t spt; /* [-u] sectors per track */ u_int16_t hds; /* [-h] drive heads */ u_int32_t hid; /* [-o] hidden sectors */ u_int32_t bsec; /* [-s] big total sectors */ }; /* FAT32 extensions */ struct bsxbpb { u_int32_t bspf; /* [-a] big sectors per FAT */ u_int16_t xflg; /* control flags */ u_int16_t vers; /* file system version */ u_int32_t rdcl; /* root directory start cluster */ u_int16_t infs; /* [-i] file system info sector */ u_int16_t bkbs; /* [-k] backup boot sector */ }; EXAMPLES
newfs_msdos /dev/rwd1a Create a file system, using default parameters, on /dev/rwd1a. newfs_msdos -f 1440 -L foo /dev/rfd0a Create a standard 1.44M file system, with volume label foo, on /dev/rfd0a. Create a 30MB image file, with the FAT partition starting 63 sec- tors within the image file: newfs_msdos -C 30M -@63s ./somefile DIAGNOSTICS
Exit status is 0 on success and 1 on error. SEE ALSO
disktab(5), disklabel(8), fdisk(8), newfs(8) HISTORY
The newfs_msdos command first appeared in NetBSD 1.3. AUTHORS
Robert Nordier <rnordier@FreeBSD.org>. BSD
March 26, 2009 BSD
All times are GMT -4. The time now is 09:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy