Commit 7972ba3b authored by Seblu's avatar Seblu
Browse files

add fstrim

up kernel to 2.6.37-rc1


git-svn-id: https://seblu.net/s/archpkg@5 02741741-5192-46b8-8916-7152b19231d9
parent 254c7d0c
Loading
Loading
Loading
Loading

fstrim/PKGBUILD

0 → 100644
+25 −0
Original line number Diff line number Diff line
# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net>

pkgname=fstrim
pkgver=0.1
pkgrel=1
pkgdesc="Uses FITRIM ioctl to discard parts of an online filesystem"
arch=('i686' 'x86_64')
url="http://fstrim.sourceforge.net/"
license=('GPL2')
source=(
  http://downloads.sourceforge.net/project/fstrim/fstrim-0.1.tar.bz2
  ) 
md5sums=('6246785af65061ec12e2bac1b1d67f21')

build() {
  cd "${srcdir}/$pkgname"
  make
}

package() {
  cd "${srcdir}/$pkgname"
  install -D -m755 "$pkgname" "${pkgdir}/usr/bin/$pkgname"
}

# vim:set ts=2 sw=2 ft=sh et:
+2 −2
Original line number Diff line number Diff line
# Maintainer: Sebastien Luttringer <seblu@seblu.net>
pkgname=kernel-rwolf
pkgver=2.6.35.8
pkgver=2.6.37_rc1
pkgrel=1
makedepends=('gcc')
arch=('x86_64')
@@ -145,7 +145,7 @@ copy_headers() {
  [ localversion* ] && install -D -m644 localversion* ${pkgdir}/usr/src/linux-${_compver}/
  mkdir -p ${pkgdir}/usr/src/linux-${_compver}/include

  for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
  for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do
    cp -a include/$i ${pkgdir}/usr/src/linux-${_compver}/include/
  done

+188 −128

File changed.

Preview size limit exceeded, changes collapsed.

+21 −22
Original line number Diff line number Diff line
Index: linux-2.6/drivers/acpi/ac.c
===================================================================
--- linux-2.6.orig/drivers/acpi/ac.c
+++ linux-2.6/drivers/acpi/ac.c
@@ -104,26 +104,6 @@
@@ -100,24 +100,7 @@ static const struct file_operations acpi
 	.release = single_release,
 };
 #endif
-#ifdef CONFIG_ACPI_SYSFS_POWER
-static int get_ac_property(struct power_supply *psy,
-			   enum power_supply_property psp,
-			   union power_supply_propval *val)
@@ -19,15 +20,14 @@
-	}
-	return 0;
-}
-
 
-static enum power_supply_property ac_props[] = {
-	POWER_SUPPLY_PROP_ONLINE,
-};
-#endif
 /* --------------------------------------------------------------------------
                                AC Adapter Management
    -------------------------------------------------------------------------- */
@@ -146,6 +126,35 @@
@@ -140,6 +123,34 @@ static int acpi_ac_get_state(struct acpi
 	return 0;
 }
 
@@ -41,7 +41,7 @@
+	struct acpi_ac *ac = to_acpi_ac(psy);
+
+	if (!ac)
+       return -EINVAL;
+		return -ENODEV;
+
+	if (acpi_ac_get_state(ac))
+		return -ENODEV;
@@ -59,7 +59,6 @@
+static enum power_supply_property ac_props[] = {
+	POWER_SUPPLY_PROP_ONLINE,
+};
+
 #ifdef CONFIG_ACPI_PROCFS_POWER
 /* --------------------------------------------------------------------------
                               FS Interface (/proc)
+14 −0
Original line number Diff line number Diff line
Index: linux-2.6/drivers/acpi/battery.c
===================================================================
--- linux-2.6.orig/drivers/acpi/battery.c
+++ linux-2.6/drivers/acpi/battery.c
@@ -184,6 +184,9 @@ static int acpi_battery_get_property(str
 	int ret = 0;
 	struct acpi_battery *battery = to_acpi_battery(psy);
 
+	if (acpi_battery_update(battery))
+		return -ENODEV;
+
 	if (acpi_battery_present(battery)) {
 		/* run battery update only if it is present */
 		acpi_battery_get_state(battery);
Loading