From: ChenQi <Qi.Chen@windriver.com>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: Christopher Larson <clarson@kergoth.com>,
chen_q07@163.com,
Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH V4 02/10] use a uniform way to determine whether rootfs is read-only
Date: Thu, 8 Aug 2013 10:17:06 +0800 [thread overview]
Message-ID: <5202FFA2.8030308@windriver.com> (raw)
In-Reply-To: <CAP9ODKpyS3L0H6HpRwouVmesHXr8Yk3AW48s2_xCZhkKMF8iJQ@mail.gmail.com>
On 08/08/2013 04:29 AM, Otavio Salvador wrote:
> On Wed, Aug 7, 2013 at 5:08 AM, <Qi.Chen@windriver.com> wrote:
> ...
>> --- a/meta/recipes-core/initscripts/initscripts-1.0/functions
>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/functions
>> @@ -58,3 +58,17 @@ status() {
>> fi
>> return 3
>> }
>> +
>> +# Determine whether rootfs is read-only or not according to /proc/mounts or /etc/fstab.
>> +is_rootfs_readonly () {
>> + local DIRNAME=`dirname $0`
>> + local ROOT_DIR=`echo $DIRNAME | sed -ne 's:/etc/.*::p'`
>> + local criteria_file
>> + [ -n "$ROOT_DIR" ] && criteria_file="$ROOT_DIR/etc/fstab" || criteria_file="/proc/mounts"
>> + local flag
>> + for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }' < $criteria_file`; do
>> + [ "$flag" = "ro" ] && { echo "yes"; return 0; }
>> + done
>> + echo "no"
>> + return 0
>> +}
>> \ No newline at end of file
> Please fix this.
>
Thanks for pointing it out.
Remote branch has been updated :)
Best Regards,
Chen Qi
next prev parent reply other threads:[~2013-08-08 2:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 8:08 [PATCH V4 00/10] Make read-only rootfs work with live images Qi.Chen
2013-08-07 8:08 ` [PATCH V4 01/10] init-live.sh: make $ROOT_MOUNT/media writable when necessary Qi.Chen
2013-08-07 8:08 ` [PATCH V4 02/10] use a uniform way to determine whether rootfs is read-only Qi.Chen
2013-08-07 20:29 ` Otavio Salvador
2013-08-08 2:17 ` ChenQi [this message]
2013-08-07 8:08 ` [PATCH V4 03/10] udev: remove implicit dependency on initscripts Qi.Chen
2013-08-07 8:08 ` [PATCH V4 04/10] populate-volatile.sh: use $ROOT_DIR/var/volatile/tmp as TMPDIR Qi.Chen
2013-08-07 8:08 ` [PATCH V4 05/10] populate-volatile.sh: don't spawn background process at rootfs time Qi.Chen
2013-08-07 8:08 ` [PATCH V4 06/10] runqemu-internal: fix to start X correctly in live images Qi.Chen
2013-08-07 8:08 ` [PATCH V4 07/10] initscripts: use a uniform way to handle directories in read-only rootfs Qi.Chen
2013-08-07 8:08 ` [PATCH V4 08/10] populate-volatile.sh: use 'cp -a' to avoid potential problem Qi.Chen
2013-08-08 2:50 ` ChenQi
2013-08-07 8:08 ` [PATCH V4 09/10] irda-utils: fix for read-only rootfs Qi.Chen
2013-08-07 14:18 ` Chris Larson
2013-08-08 2:10 ` ChenQi
2013-08-08 2:23 ` Khem Raj
2013-08-08 2:29 ` ChenQi
2013-08-07 8:08 ` [PATCH V4 10/10] openssh: " Qi.Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5202FFA2.8030308@windriver.com \
--to=qi.chen@windriver.com \
--cc=chen_q07@163.com \
--cc=clarson@kergoth.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=otavio@ossystems.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.