[maemo-commits] [maemo-commits] r16812 - in projects/haf/trunk/ke-recv: debian src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Dec 1 10:26:05 EET 2008
- Previous message: [maemo-commits] r16811 - projects/haf/trunk/mtools/debian
- Next message: [maemo-commits] r16813 - projects/haf/trunk/ke-recv/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala
Date: 2008-12-01 10:26:04 +0200 (Mon, 01 Dec 2008)
New Revision: 16812
Modified:
projects/haf/trunk/ke-recv/debian/changelog
projects/haf/trunk/ke-recv/debian/control
projects/haf/trunk/ke-recv/src/events.c
projects/haf/trunk/ke-recv/src/fremantle-format-internal-memory-card.sh
Log:
swap partition is 768MB, added workaround for not yet partitioned internal mmcs
Modified: projects/haf/trunk/ke-recv/debian/changelog
===================================================================
--- projects/haf/trunk/ke-recv/debian/changelog 2008-12-01 07:50:05 UTC (rev 16811)
+++ projects/haf/trunk/ke-recv/debian/changelog 2008-12-01 08:26:04 UTC (rev 16812)
@@ -4,7 +4,7 @@
* Added D-Bus interfaces for enabling PC Suite or mass storage mode when in
the new S_PERIPHERAL_WAIT state.
* g_nokia is now the default kernel module.
- * Add dosfstools dependency.
+ * Add dosfstools and mtools dependency.
* Added a shell script for partitioning the internal memory card.
-- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> Fri, 28 Nov 2008 14:32:03 +0200
Modified: projects/haf/trunk/ke-recv/debian/control
===================================================================
--- projects/haf/trunk/ke-recv/debian/control 2008-12-01 07:50:05 UTC (rev 16811)
+++ projects/haf/trunk/ke-recv/debian/control 2008-12-01 08:26:04 UTC (rev 16812)
@@ -7,7 +7,7 @@
Package: ke-recv
Architecture: any
-Depends: ${shlibs:Depends}, ke-recv-l10n-mr | ke-recv-l10n-mr0, gconf2, osso-af-startup (>= 1.22), hal, dosfstools
+Depends: ${shlibs:Depends}, ke-recv-l10n-mr | ke-recv-l10n-mr0, gconf2, osso-af-startup (>= 1.22), hal, dosfstools, mtools
Description: Program for automatical mounting and unmounting of memory cards.
Program for receiving HW events from the HAL, managing mounting, renaming,
formatting, and partitioning of memory cards, etc.
Modified: projects/haf/trunk/ke-recv/src/events.c
===================================================================
--- projects/haf/trunk/ke-recv/src/events.c 2008-12-01 07:50:05 UTC (rev 16811)
+++ projects/haf/trunk/ke-recv/src/events.c 2008-12-01 08:26:04 UTC (rev 16812)
@@ -666,15 +666,24 @@
int ret;
const char* args[] = {MMC_FORMAT_PROG, NULL, NULL, NULL, NULL};
volume_list_t *vol;
+ char buf[100];
ULOG_DEBUG_F("label for %s is '%s'", mmc->name, mmc->desired_label);
vol = get_nth_volume(mmc, mmc->preferred_volume);
- if (vol == NULL || vol->dev_name == NULL) {
+ if ((vol == NULL || vol->dev_name == NULL)
+ && !mmc->control_partitions) {
ULOG_ERR_F("could not find partition number %d",
mmc->preferred_volume);
- return;
+ if (mmc->preferred_volume != 1 && mmc->internal_card) {
+ /* workaround for not yet partitioned systems */
+ ULOG_DEBUG_F("%s: falling back to partition 1!");
+ vol = get_nth_volume(mmc, 1);
+ if (vol == NULL || vol->dev_name == NULL)
+ return;
+ } else
+ return;
}
if (!mmc->control_partitions) {
@@ -689,7 +698,12 @@
}
} else {
args[1] = mmc->whole_device;
- args[2] = vol->dev_name;
+ if (vol == NULL || vol->dev_name == NULL) {
+ snprintf(buf, 100, "%sp%d", mmc->whole_device,
+ mmc->preferred_volume);
+ args[2] = buf;
+ } else
+ args[2] = vol->dev_name;
args[3] = mmc->desired_label;
ret = unmount_volumes(&mmc->volumes);
@@ -788,7 +802,14 @@
if (l == NULL || l->udi == NULL) {
ULOG_DEBUG_F("partition %d not found", mmc->preferred_volume);
- return 0;
+ if (mmc->preferred_volume != 1 && mmc->internal_card) {
+ /* workaround for not yet partitioned systems */
+ ULOG_DEBUG_F("%s: falling back to partition 1!");
+ l = get_nth_volume(mmc, 1);
+ if (l == NULL || l->udi == NULL)
+ return 0;
+ } else
+ return 0;
}
udi = l->udi;
device = l->dev_name;
Modified: projects/haf/trunk/ke-recv/src/fremantle-format-internal-memory-card.sh
===================================================================
--- projects/haf/trunk/ke-recv/src/fremantle-format-internal-memory-card.sh 2008-12-01 07:50:05 UTC (rev 16811)
+++ projects/haf/trunk/ke-recv/src/fremantle-format-internal-memory-card.sh 2008-12-01 08:26:04 UTC (rev 16812)
@@ -31,7 +31,7 @@
umount ${1}p3
sfdisk -D -uM $1 << EOF
-,512,S
+,768,S
,2048,L
,,b
EOF
- Previous message: [maemo-commits] r16811 - projects/haf/trunk/mtools/debian
- Next message: [maemo-commits] r16813 - projects/haf/trunk/ke-recv/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
