Bug 12117 - Gpart fails to open large files (e.g. disk images)
: Gpart fails to open large files (e.g. disk images)
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/gpart)
: unstable
: all Linux
: P2 minor
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2007-06-23 17:07 by
Modified: 2007-12-20 16:32 (History)


Attachments
The patch that adds O_LARGEFILE (1.37 KB, patch)
2007-06-23 17:08, Konstantin Uvarin (lodin)
no flags Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-06-23 17:07:55
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 

Actual Results:  
fails to open

Expected Results:  
gpart should work as if it was operating on a drive
------- Comment #1 From 2007-06-23 17:08:53 -------
Created an attachment (id=2031) [details]
The patch that adds O_LARGEFILE
------- Comment #2 From 2007-06-23 20:46:59 -------
let's assign it to myself
------- Comment #3 From 2007-12-20 16:32:28 -------
Патч приложен к сборке 0.1h-alt4, спасибо!
(не прошло и полгода :)