From patchwork Fri Oct 21 08:52:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Bur X-Patchwork-Id: 684950 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t0fc230gvz9s3s for ; Fri, 21 Oct 2016 19:53:54 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3t0fc225dczDvc6 for ; Fri, 21 Oct 2016 19:53:54 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3t0fbW5tTYzDvbK for ; Fri, 21 Oct 2016 19:53:27 +1100 (AEDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9L8mnaF086130 for ; Fri, 21 Oct 2016 04:53:26 -0400 Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144]) by mx0a-001b2d01.pphosted.com with ESMTP id 267f7ehuuf-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 21 Oct 2016 04:53:25 -0400 Received: from localhost by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Oct 2016 18:53:22 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp02.au.ibm.com (202.81.31.208) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 21 Oct 2016 18:53:19 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 37E562BB0067 for ; Fri, 21 Oct 2016 19:53:17 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9L8rHS811010194 for ; Fri, 21 Oct 2016 19:53:17 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9L8rGwJ023537 for ; Fri, 21 Oct 2016 19:53:16 +1100 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u9L8rGrs023533; Fri, 21 Oct 2016 19:53:16 +1100 Received: from camb691.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id A351FA01E3; Fri, 21 Oct 2016 19:53:16 +1100 (AEDT) From: Cyril Bur To: skiboot@lists.ozlabs.org, joel@jms.id.au Date: Fri, 21 Oct 2016 19:52:45 +1100 X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161021085246.17116-1-cyril.bur@au1.ibm.com> References: <20161021085246.17116-1-cyril.bur@au1.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102108-0004-0000-0000-000001A9934D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102108-0005-0000-0000-000008ED01F2 Message-Id: <20161021085246.17116-4-cyril.bur@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-10-21_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610210159 Subject: [Skiboot] [PATCH 4/5] external/pflash: Catch incompatible combination of flags X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Cyril Bur --- external/pflash/pflash.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c index 002d0dc..608220f 100644 --- a/external/pflash/pflash.c +++ b/external/pflash/pflash.c @@ -743,6 +743,16 @@ int main(int argc, char *argv[]) exit(1); } + if (flashfilename && bmc_flash) { + fprintf(stderr, "Filename or bmc flash but not both\n"); + exit(1); + } + + if (flashfilename && mtd) { + fprintf(stderr, "Filename or mtd access but not both\n"); + exit(1); + } + /* If file specified but not size, get size from file */ if (write_file && !write_size) {