Merge lp:~csurbhi/ubuntu/natty/mountall/mountall-error.fix into lp:ubuntu/natty/mountall

Proposed by Surbhi Palande
Status: Merged
Merge reported by: Marc Deslauriers
Merged at revision: not available
Proposed branch: lp:~csurbhi/ubuntu/natty/mountall/mountall-error.fix
Merge into: lp:ubuntu/natty/mountall
Diff against target: 40 lines (+11/-2)
2 files modified
debian/changelog (+9/-0)
src/mountall.c (+2/-2)
To merge this branch: bzr merge lp:~csurbhi/ubuntu/natty/mountall/mountall-error.fix
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+57457@code.launchpad.net

Description of the change

This change fixes two errors that I encountered while code browsing/testing.
1) find_mount("/") returns NULL when / is not found, so cannot access root->mounted (as root is NULL in this case)
2) In activate_timer(): the information message about the dev_wait_timeout should be printed after
    dev_wait_timeout is initialized properly.

Please consider merging this for natty.

To post a comment you must log in.
359. By Surbhi Palande

Fixed two errors found while browsing the code: 1) find_mount("/") returns
NULL when / is not found, so cannot access root->mounted. 2) the
information message about the dev_wait_timeout should be printed after
dev_wait_timeout is initialized properly.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Looks like this already got merged, so setting status to "merged".

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-03-19 16:46:02 +0000
+++ debian/changelog 2011-04-13 11:41:28 +0000
@@ -1,3 +1,12 @@
1mountall (2.25ubuntu1) natty; urgency=low
2
3 * Fixed two errors found while browsing the code: 1) find_mount("/") returns
4 NULL when / is not found, so cannot access root->mounted. 2) the
5 information message about the dev_wait_timeout should be printed after
6 dev_wait_timeout is initialized properly.
7
8 -- Surbhi Palande <surbhi.palande@canonical.com> Wed, 13 Apr 2011 12:59:22 +0300
9
1mountall (2.25) natty; urgency=low10mountall (2.25) natty; urgency=low
211
3 * src/mountall.c: ignore ureadahead's potential mount of12 * src/mountall.c: ignore ureadahead's potential mount of
413
=== modified file 'src/mountall.c'
--- src/mountall.c 2011-03-19 16:46:02 +0000
+++ src/mountall.c 2011-04-13 11:41:28 +0000
@@ -1647,9 +1647,9 @@
1647 || (! strncmp (mnt->device, "UUID=", 5))1647 || (! strncmp (mnt->device, "UUID=", 5))
1648 || (! strncmp (mnt->device, "LABEL=", 6))))1648 || (! strncmp (mnt->device, "LABEL=", 6))))
1649 {1649 {
1650 nih_message(_("Shall wait for device: %s for %d seconds, starting timer"), MOUNT_NAME (mnt), dev_wait_time);
1651 if(!dev_wait_time)1650 if(!dev_wait_time)
1652 dev_wait_time = ROOTDELAY;1651 dev_wait_time = ROOTDELAY;
1652 nih_message(_("Shall wait for device: %s for %d seconds, starting timer"), MOUNT_NAME (mnt), dev_wait_time);
1653 device_ready_timer = NIH_MUST (nih_timer_add_timeout (NULL, 1653 device_ready_timer = NIH_MUST (nih_timer_add_timeout (NULL,
1654 dev_wait_time, is_device_ready, NULL));1654 dev_wait_time, is_device_ready, NULL));
1655 break;1655 break;
@@ -3473,7 +3473,7 @@
34733473
3474 /* Sanity check, the root filesystem should be already mounted */3474 /* Sanity check, the root filesystem should be already mounted */
3475 root = find_mount ("/");3475 root = find_mount ("/");
3476 if (! root->mounted) {3476 if (! root || ! root->mounted ) {
3477 nih_fatal ("%s", _("root filesystem isn't mounted"));3477 nih_fatal ("%s", _("root filesystem isn't mounted"));
3478 exit (EXIT_ERROR);3478 exit (EXIT_ERROR);
3479 }3479 }

Subscribers

People subscribed via source and target branches