| Summary: | Gpart fails to open large files (e.g. disk images) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Sisyphus | Reporter: | Konstantin Uvarin (lodin) <khedin> | ||||
| Component: | gpart | Assignee: | Michael Shigorin <mike> | ||||
| Status: | CLOSED FIXED | QA Contact: | qa-sisyphus | ||||
| Severity: | minor | ||||||
| Priority: | P2 | CC: | mike, vsu | ||||
| Version: | unstable | ||||||
| Hardware: | all | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
Created attachment 2031 [details]
The patch that adds O_LARGEFILE
let's assign it to myself Патч приложен к сборке 0.1h-alt4, спасибо! (не прошло и полгода :) |
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