ntfsresize prompts ( on non tty ) and refuses to resize dirty volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ntfs-3g |
Fix Released
|
Medium
|
|||
gparted (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
ntfs-3g (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
ntfsresize prints a warning and prompts for input whether it should proceed or not in response to the dirty volume flag. When stdin is connected to /dev/null, it refuses to proceed. Interactive prompts should not be made when stdin is not a tty. The --force flag should also cause the resize to proceed.
Reproduction:
mkfs.ntfs -f /dev/vg/ntfs
ntfsfix /dev/vg/ntfs
ntfsresize -P --force -s 1G /dev/vg/ntfs < /dev/null
ntfsresize v2011.4.12AR.4 (libntfs-3g)
Device name : /dev/devserv/ntfs
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 5368705536 bytes (5369 MB)
Current device size: 5368709120 bytes (5369 MB)
New volume size : 999993856 bytes (1000 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 28 MB (0.5%)
Collecting resizing constraints ...
Needed relocations : 6554 (27 MB)
WARNING: Every sanity check passed and only the dangerous operations left.
Make sure that important data has been backed up! Power outage or computer
crash may result major data loss!
Are you sure you want to proceed (y/[n])? OK quitting. NO CHANGES have been made to your NTFS volume.
description: | updated |
Changed in ntfs-3g: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
In the future, please attach log files instead of pasting them into the description.