Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <brian.foster@innova-card.com>
To: buildroot@busybox.net
Subject: [PATCH] makedevs: Use sync(2) instead running /bin/sync
Date: Wed, 19 Nov 2008 17:36:26 +0100	[thread overview]
Message-ID: <mailman.0.1227276119.1345.buildroot@uclibc.org> (raw)

When compiled  -O2 -D_FORTIFY_SOURCE=2  with gcc v4,
the call  system("/bin/sync")  causes a fatal error,
   makedevs.c:531: error: ignoring return value of ?system?
This is the case (by default) on Ubuntu 8.10; for details
see  https://wiki.kubuntu.org/CompilerFlags

In any case, using system(3) to run (via the shell) sync(1)
is silly.  Avoid the issues by directly calling sync(2).

Signed-off-by: Brian Foster <brian.foster@innova-card.com>
---
	This patch is against r22481.
	It fixes Innova Card defect http://busybox.net/bugs/view.php?id=1090.

 target/makedevs/makedevs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target/makedevs/makedevs.c b/target/makedevs/makedevs.c
index 8fa3048..de88079 100644
--- a/target/makedevs/makedevs.c
+++ b/target/makedevs/makedevs.c
@@ -528,7 +528,7 @@ loop:
 	}
 	fclose(table);
 
-	system("/bin/sync");
+	sync();
 
 	return 0;
 }
-- 
1.6.0.4


====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-21-08 06:01  blf            New Issue                                    
11-21-08 06:01  blf            Status                   new => assigned     
11-21-08 06:01  blf            Assigned To               => buildroot       
======================================================================

             reply	other threads:[~2008-11-19 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19 16:36 Brian Foster [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-11-19 16:36 [PATCH] makedevs: Use sync(2) instead running /bin/sync Brian Foster

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=mailman.0.1227276119.1345.buildroot@uclibc.org \
    --to=brian.foster@innova-card.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox