ALT Linux Bugzilla – #12117
Gpart fails to open large files (e.g. disk images)
Last modified: 2007-12-20 16:32:31
You need to
before you can comment on or make changes to this bug.
When trying to open very large files (but not devices), gpart stops with "File
too large" error messages.
replacing O_RDONLY with O_RDONLY|O_LARGEFILE and adding -D_LARGEFILE64_SOURCE
to the compile options seems to help.
So I'm attaching a patch, hoping it's useful.
Steps to Reproduce:
1. # dd if=/dev/sda of=somefile
/dev/sda size >= several gig
2. # gpart -g somefile
fails to open
gpart should work as if it was operating on a drive
Created an attachment (id=2031) [details]
The patch that adds O_LARGEFILE
let's assign it to myself
Патч приложен к сборке 0.1h-alt4, спасибо!
(не прошло и полгода :)