View | Details | Raw Unified | Return to bug 364365
Collapse All | Expand All

(-)file_not_specified_in_diff (-5 / +13 lines)
Line  Link Here
--
1
fs/partitions/msdos.c |   15 ++++++++++++---
fs/partitions/msdos.c |   15 ++++++++++++---
2
1 file changed, 12 insertions(+), 3 deletions(-)
1
1 file changed, 12 insertions(+), 3 deletions(-)
3
-- a/fs/partitions/msdos.c
2
++ b/fs/partitions/msdos.c
Lines 18-24 Link Here
18
 *
18
 *
19
 *  Re-organised Feb 1998 Russell King
19
 *  Re-organised Feb 1998 Russell King
20
 */
20
 */
21
21
#include <linux/msdos_fs.h>
22
22
23
#include "check.h"
23
#include "check.h"
24
#include "msdos.h"
24
#include "msdos.h"
Lines 419-424 int msdos_partition(struct parsed_partit Link Here
419
	Sector sect;
419
	Sector sect;
420
	unsigned char *data;
420
	unsigned char *data;
421
	struct partition *p;
421
	struct partition *p;
422
	struct fat_boot_sector *fb;
422
	int slot;
423
	int slot;
423
424
424
	data = read_dev_sector(bdev, 0, &sect);
425
	data = read_dev_sector(bdev, 0, &sect);
Lines 444-451 int msdos_partition(struct parsed_partit Link Here
444
	p = (struct partition *) (data + 0x1be);
445
	p = (struct partition *) (data + 0x1be);
445
	for (slot = 1; slot <= 4; slot++, p++) {
446
	for (slot = 1; slot <= 4; slot++, p++) {
446
		if (p->boot_ind != 0 && p->boot_ind != 0x80) {
447
		if (p->boot_ind != 0 && p->boot_ind != 0x80) {
447
			put_dev_sector(sect);
448
			fb = (struct fat_boot_sector *) data;
448
			return 0;
449
			if (slot == 1 && fb->reserved && fb->fats
450
				&& fat_valid_media(fb->media)) {
451
				printk("\n");
452
				put_dev_sector(sect);
453
				return 1;
454
			} else {
455
				put_dev_sector(sect);
456
				return 0;
457
			}
449
		}
458
		}
450
	}
459
	}
451
460

Return to bug 364365