Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116308
b: refs/heads/master
c: da16787
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 17, 2008
1 parent f044ad2 commit 7b4a0b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe11edfaabf1787c05d782a7b33e6497d1118b1d
refs/heads/master: da167876bd0f71f1c646e5dd98997544d8d90e8e
8 changes: 4 additions & 4 deletions trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,11 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive)
}

if (pc.buf[3] & 0x80)
drive->atapi_flags |= IDE_AFLAG_WP;
drive->dev_flags |= IDE_DFLAG_WP;
else
drive->atapi_flags &= ~IDE_AFLAG_WP;
drive->dev_flags &= ~IDE_DFLAG_WP;

set_disk_ro(disk, !!(drive->atapi_flags & IDE_AFLAG_WP));
set_disk_ro(disk, !!(drive->dev_flags & IDE_DFLAG_WP));

page = &pc.buf[8];

Expand Down Expand Up @@ -684,7 +684,7 @@ static int idefloppy_open(struct inode *inode, struct file *filp)
goto out_put_floppy;
}

if ((drive->atapi_flags & IDE_AFLAG_WP) && (filp->f_mode & 2)) {
if ((drive->dev_flags & IDE_DFLAG_WP) && (filp->f_mode & 2)) {
ret = -EROFS;
goto out_put_floppy;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,6 @@ enum {
IDE_AFLAG_CLIK_DRIVE = (1 << 19),
/* Requires BH algorithm for packets */
IDE_AFLAG_ZIP_DRIVE = (1 << 20),
/* Write protect */
IDE_AFLAG_WP = (1 << 21),
/* Supports format progress report */
IDE_AFLAG_SRFP = (1 << 22),

Expand Down Expand Up @@ -579,6 +577,8 @@ enum {
/* heads unloaded, please don't reset port */
IDE_DFLAG_PARKED = (1 << 28),
IDE_DFLAG_MEDIA_CHANGED = (1 << 29),
/* write protect */
IDE_DFLAG_WP = (1 << 30),
};

struct ide_drive_s {
Expand Down

0 comments on commit 7b4a0b0

Please sign in to comment.