.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "READ_NTFS_BOOT_SECTOR" "" "06 October 2005" "" "" .SH NAME read_ntfs_boot_sector \- read the NTFS boot sector of a device .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp struct buffer_head * read_ntfs_boot_sector (struct super_block * \fIsb\fB, const int \fIsilent\fB); \fR .SH "ARGUMENTS" .TP \fB\fIsb\fB\fR super block of device to read the boot sector from .TP \fB\fIsilent\fB\fR if true, suppress all output .SH "DESCRIPTION" .PP 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. .PP 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). .SH "NOTE" .PP To call this function, \fIsb\fR 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. .PP Return the unlocked buffer head containing the boot sector or NULL on error.