From patchwork Thu Jul 18 15:43:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeroen Roovers X-Patchwork-Id: 2829690 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9A3F9C0AB2 for ; Thu, 18 Jul 2013 15:43:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 887D7201BB for ; Thu, 18 Jul 2013 15:43:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D430820126 for ; Thu, 18 Jul 2013 15:43:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758222Ab3GRPnv (ORCPT ); Thu, 18 Jul 2013 11:43:51 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:36510 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758217Ab3GRPnv (ORCPT ); Thu, 18 Jul 2013 11:43:51 -0400 Received: from marga.jer-c2.orkz.net (D4B2706A.static.ziggozakelijk.nl [212.178.112.106]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jer) by smtp.gentoo.org (Postfix) with ESMTPSA id 09DDD335E17; Thu, 18 Jul 2013 15:43:49 +0000 (UTC) Date: Thu, 18 Jul 2013 17:43:46 +0200 From: Jeroen Roovers To: Helge Deller Cc: linux-parisc@vger.kernel.org Subject: [PATCH] palo/palo.c:482:5: /usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments Message-ID: <20130718174346.022491f8@marga.jer-c2.orkz.net> In-Reply-To: <20130718165539.15e7e327@marga.jer-c2.orkz.net> References: <20130718165539.15e7e327@marga.jer-c2.orkz.net> X-Mailer: Claws Mail 3.9.2-dirty (GTK+ 2.24.17; i686-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In file included from /usr/include/fcntl.h:296:0, from palo.c:16: In function 'open', inlined from 'do_formatted' at palo.c:482:5: /usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments Signed-off-by: Jeroen Roovers --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/palo/palo.c b/palo/palo.c index 10031fd..fffb7ec 100644 --- a/palo/palo.c +++ b/palo/palo.c @@ -484,7 +484,7 @@ do_formatted(int init, int media, const char *medianame, int partition, error(14, "bootloader"); sprintf(badblockfilename, "/tmp/paloblk-%d", getpid()); - if ((fd = open(badblockfilename, O_RDWR | O_CREAT | O_TRUNC)) < 0) { + if ((fd = open(badblockfilename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) < 0) { perror(badblockfilename); exit(1); }