READ_NTFS_BOOT_SECTOR

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

read_ntfs_boot_sector - read the NTFS boot sector of a device  

SYNOPSIS

"SYNOPSIS"

struct buffer_head * read_ntfs_boot_sector (struct super_block * sb, const int silent);  

ARGUMENTS

sb
super block of device to read the boot sector from
silent
if true, suppress all output
 

DESCRIPTION

Reads the boot sector from the device and validates it. If that fails, tries to read the backup boot sector, first from the end of the device a-la NT4 and later and then from the middle of the device a-la NT3.51 and before.

If a valid boot sector is found but it is not the primary boot sector, we repair the primary boot sector silently (unless the device is read-only or the primary boot sector is not accessible).  

NOTE

To call this function, sb must have the fields s_dev, the ntfs super block (u.ntfs_sb), nr_blocks and the device flags (s_flags) initialized to their respective values.

Return the unlocked buffer head containing the boot sector or NULL on error.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
NOTE

This document was created by man2html, using the manual pages.
Time: 00:02:42 GMT, October 09, 2005