summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/dosfstools/PKGBUILD24
-rw-r--r--core/dosfstools/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch25
2 files changed, 49 insertions, 0 deletions
diff --git a/core/dosfstools/PKGBUILD b/core/dosfstools/PKGBUILD
new file mode 100644
index 000000000..ad0747bee
--- /dev/null
+++ b/core/dosfstools/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 186902 2013-05-31 16:49:40Z tpowa $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Committer: Judd Vinet <jvinet@zeroflux.org>
+pkgname=dosfstools
+pkgver=3.0.17
+pkgrel=1
+pkgdesc="DOS filesystem utilities"
+arch=(i686 x86_64)
+depends=('glibc')
+source=(http://www.daniel-baumann.ch/files/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+url="http://www.daniel-baumann.ch/software/dosfstools/"
+license=('GPL2')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make
+}
+
+package () {
+ cd $srcdir/$pkgname-$pkgver
+ make PREFIX=$pkgdir SBINDIR=$pkgdir/usr/bin MANDIR=$pkgdir/usr/share/man DOCDIR=$pkgdir/usr/share/doc install
+}
+md5sums=('468b953ddc8baf66e9881d1a5eae03e2'
+ 'SKIP')
diff --git a/core/dosfstools/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch b/core/dosfstools/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch
new file mode 100644
index 000000000..44e6e86b5
--- /dev/null
+++ b/core/dosfstools/dosfstools-3.0.12-fix-alloc-rootdir-entry.patch
@@ -0,0 +1,25 @@
+--- dosfstools-3.0.12/src/check.c.old 2010-01-23 10:13:17.000000000 +0100
++++ dosfstools-3.0.12/src/check.c 2011-01-31 17:43:31.462674941 +0100
+@@ -174,7 +174,10 @@
+ offset = fs->root_start + next_free * sizeof(DIR_ENT);
+ memset(de, 0, sizeof(DIR_ENT));
+ while (1) {
+- sprintf((char *)de->name, pattern, curr_num);
++ char expanded[12];
++ sprintf(expanded, pattern, curr_num);
++ memcpy(de->name, expanded, 8);
++ memcpy(de->ext, expanded + 8, 3);
+ for (scan = 0; scan < fs->root_entries; scan++)
+ if (scan != next_free &&
+ !strncmp((const char *)root[scan].name,
+--- dosfstools-3.0.12/src/fat.c
++++ dosfstools-3.0.12/src/fat.c
+@@ -474,7 +474,7 @@ void reclaim_file(DOS_FS * fs)
+ DIR_ENT de;
+ loff_t offset;
+ files++;
+- offset = alloc_rootdir_entry(fs, &de, "FSCK%04d");
++ offset = alloc_rootdir_entry(fs, &de, "FSCK%04dREC");
+ de.start = CT_LE_W(i & 0xffff);
+ if (fs->fat_bits == 32)
+ de.starthi = CT_LE_W(i >> 16);