ALT Linux Bugzilla
– Attachment 2031 Details for
Bug 12117
Gpart fails to open large files (e.g. disk images)
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
The patch that adds O_LARGEFILE
gpart-lodin.patch (text/plain), 1.37 KB, created by
Konstantin Uvarin (lodin)
on 2007-06-23 17:08:53 MSD
(
hide
)
Description:
The patch that adds O_LARGEFILE
Filename:
MIME Type:
Creator:
Konstantin Uvarin (lodin)
Created:
2007-06-23 17:08:53 MSD
Size:
1.37 KB
patch
obsolete
>diff -ur gpart-0.1h/make.defs gpart-0.1h-lodin/make.defs >--- gpart-0.1h/make.defs 2007-06-23 16:36:26 +0400 >+++ gpart-0.1h-lodin/make.defs 2007-06-23 16:33:23 +0400 >@@ -2,7 +2,7 @@ > # > # > CC = gcc >-CFLAGS = $(RPM_OPT_FLAGS) -std=gnu99 -pedantic >+CFLAGS = $(RPM_OPT_FLAGS) -std=gnu99 -pedantic -D_LARGEFILE64_SOURCE > LDFLAGS = > MAKEDEP = gcc -M > INSTALL = install >diff -ur gpart-0.1h/src/gpart.c gpart-0.1h-lodin/src/gpart.c >--- gpart-0.1h/src/gpart.c 2001-02-07 21:08:08 +0300 >+++ gpart-0.1h-lodin/src/gpart.c 2007-06-23 16:35:27 +0400 >@@ -49,13 +49,21 @@ > #include <stdio.h> > #include <stdlib.h> > #include <stdarg.h> >+ > #include <fcntl.h> >+#ifndef O_LARGEFILE >+#warning no large file support, but OK for devices >+#define O_LARGEFILE 0 >+/*so now x|O_LARGEFILE == x*/ >+#endif >+ > #include <unistd.h> > #include <string.h> > #include <ctype.h> > #include <errno.h> > #include <sys/stat.h> > #include <sys/types.h> >+ > #include "gpart.h" > > >@@ -794,7 +802,7 @@ > * special file or just a regular file. > */ > >- if ((d->d_fd = open(dev,O_RDONLY)) == -1) >+ if ((d->d_fd = open(dev,O_RDONLY|O_LARGEFILE)) == -1) > pr(FATAL,EM_OPENFAIL,dev,strerror(errno)); > > /* >@@ -943,7 +953,7 @@ > s64_t bincr, noffset, start; > byte_t *ubuf; > >- if ((d->d_fd = open(d->d_dev,O_RDONLY)) == -1) >+ if ((d->d_fd = open(d->d_dev,O_RDONLY|O_LARGEFILE)) == -1) > pr(FATAL,EM_OPENFAIL,d->d_dev,strerror(errno)); > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12117
: 2031