[maemo-commits] [maemo-commits] r16813 - projects/haf/trunk/ke-recv/src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Dec 1 10:35:32 EET 2008
- Previous message: [maemo-commits] r16812 - in projects/haf/trunk/ke-recv: debian src
- Next message: [maemo-commits] r16814 - projects/haf/trunk/ke-recv/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala
Date: 2008-12-01 10:35:32 +0200 (Mon, 01 Dec 2008)
New Revision: 16813
Modified:
projects/haf/trunk/ke-recv/src/events.c
Log:
one more workaround
Modified: projects/haf/trunk/ke-recv/src/events.c
===================================================================
--- projects/haf/trunk/ke-recv/src/events.c 2008-12-01 08:26:04 UTC (rev 16812)
+++ projects/haf/trunk/ke-recv/src/events.c 2008-12-01 08:35:32 UTC (rev 16813)
@@ -110,15 +110,24 @@
char *part_device = NULL;
volume_list_t *l;
- /* find out the device name of the first partition */
- for (l = &mmc->volumes; l != NULL; l = l->next) {
- if (l->udi != NULL && l->volume_number == 1) {
- part_device = l->dev_name;
- break;
- }
+ vol = get_nth_volume(mmc, mmc->preferred_volume);
+ if (vol == NULL) {
+ ULOG_ERR_F("could not find partition number %d",
+ mmc->preferred_volume);
+ 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)
+ return;
+ } else
+ return;
}
+ part_device = vol->dev_name;
+
if (part_device == NULL) {
- ULOG_ERR_F("device name for first partition not found");
+ ULOG_ERR_F("device name for partition number %d not found",
+ vol->volume_number);
empty_file(mmc->volume_label_file);
set_localised_label(mmc);
return;
- Previous message: [maemo-commits] r16812 - in projects/haf/trunk/ke-recv: debian src
- Next message: [maemo-commits] r16814 - projects/haf/trunk/ke-recv/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
