OBS User unknown 2007-09-10 22:41:41 +00:00 committed by Git OBS Bridge
parent 1207314d33
commit 937ef436e1
3 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,35 @@
--- mkdosfs/mkdosfs.c
+++ mkdosfs/mkdosfs.c
@@ -1424,6 +1424,7 @@
int i = 0, pos, ch;
int create = 0;
unsigned long long cblocks;
+ int min_sector_size;
if (argc && *argv) { /* What's the program name? */
char *p;
@@ -1712,6 +1713,24 @@
)
die ("Will not try to make filesystem on full-disk device '%s' (use -I if wanted)");
+ if (sector_size_set)
+ {
+ if (ioctl(dev, BLKSSZGET, &min_sector_size) >= 0)
+ if (sector_size < min_sector_size)
+ {
+ sector_size = min_sector_size;
+ fprintf(stderr, "Warning: sector size was set to %d (minimal for this device)\n", sector_size);
+ }
+ }
+ else
+ {
+ if (ioctl(dev, BLKSSZGET, &min_sector_size) >= 0)
+ {
+ sector_size = min_sector_size;
+ sector_size_set = 1;
+ }
+ }
+
establish_params (statbuf.st_rdev,statbuf.st_size);
/* Establish the media parameters */

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 6 16:26:57 CEST 2007 - pgajdos@suse.cz
- determine sector size of device automatically or if -S parameter
present, verify, that it's not under physical sector size
(determine-sector-size.patch)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 9 17:08:41 CEST 2007 - olh@suse.de Thu Aug 9 17:08:41 CEST 2007 - olh@suse.de

View File

@ -17,7 +17,7 @@ Group: System/Filesystems
Autoreqprov: on Autoreqprov: on
Summary: Utilities for Making and Checking MS-DOS FAT File Systems on Linux Summary: Utilities for Making and Checking MS-DOS FAT File Systems on Linux
Version: 2.11 Version: 2.11
Release: 71 Release: 78
URL: ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools URL: ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools
Source: %{name}-%{version}.src.tar.bz2 Source: %{name}-%{version}.src.tar.bz2
Patch0: %{name}-%{version}-linuxfs.patch Patch0: %{name}-%{version}-linuxfs.patch
@ -25,6 +25,7 @@ Patch1: %{name}-%{version}-unaligned.patch
Patch2: %{name}-%{version}-buffer.patch Patch2: %{name}-%{version}-buffer.patch
Patch3: %{name}-%{version}-o_excl.patch Patch3: %{name}-%{version}-o_excl.patch
Patch4: %{name}-%{version}-mkdosfs-geo0.diff Patch4: %{name}-%{version}-mkdosfs-geo0.diff
Patch5: %{name}-%{version}_determine-sector-size.patch
Obsoletes: mkdosfs dosfsck dosfstls Obsoletes: mkdosfs dosfsck dosfstls
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Supplements: filesystem(vfat) Supplements: filesystem(vfat)
@ -49,6 +50,7 @@ Authors:
%patch2 %patch2
%patch3 %patch3
%patch4 -p1 %patch4 -p1
%patch5
%build %build
make OPTFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE $RPM_OPT_FLAGS" make OPTFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE $RPM_OPT_FLAGS"
@ -89,6 +91,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/*.gz %{_mandir}/man8/*.gz
%changelog %changelog
* Thu Sep 06 2007 - pgajdos@suse.cz
- determine sector size of device automatically or if -S parameter
present, verify, that it's not under physical sector size
(determine-sector-size.patch)
* Thu Aug 09 2007 - olh@suse.de * Thu Aug 09 2007 - olh@suse.de
- remove inclusion of asm/unaligned.h, use private copy of - remove inclusion of asm/unaligned.h, use private copy of
asm-generic/unaligned.h asm-generic/unaligned.h