From patchwork Mon Jan 5 23:50:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 5571011 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8497EBFF04 for ; Mon, 5 Jan 2015 23:50:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8860220306 for ; Mon, 5 Jan 2015 23:50:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59C3620340 for ; Mon, 5 Jan 2015 23:50:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753258AbbAEXu1 (ORCPT ); Mon, 5 Jan 2015 18:50:27 -0500 Received: from mga09.intel.com ([134.134.136.24]:63472 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753121AbbAEXuZ (ORCPT ); Mon, 5 Jan 2015 18:50:25 -0500 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 05 Jan 2015 15:48:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="436839743" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by FMSMGA003.fm.intel.com with ESMTP; 05 Jan 2015 15:38:03 -0800 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 39551200DB; Tue, 6 Jan 2015 01:50:23 +0200 (EET) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id E7D2720162; Tue, 6 Jan 2015 01:50:21 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com Subject: [yavta PATCH 2/2] Fix data offset config option parsing Date: Tue, 6 Jan 2015 01:50:15 +0200 Message-Id: <1420501815-3684-3-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.1.0.231.g7484e3b In-Reply-To: <1420501815-3684-1-git-send-email-sakari.ailus@linux.intel.com> References: <1420501815-3684-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 The option itself was considered correctly, but a small but crucial break statement was missing. --data-offset option does not take an argument either. Signed-off-by: Sakari Ailus --- yavta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yavta.c b/yavta.c index 3bec0be..7c21db2 100644 --- a/yavta.c +++ b/yavta.c @@ -1770,7 +1770,7 @@ static struct option opts[] = { {"buffer-type", 1, 0, 'B'}, {"capture", 2, 0, 'c'}, {"check-overrun", 0, 0, 'C'}, - {"data-prefix", 1, 0, OPT_DATA_PREFIX}, + {"data-prefix", 0, 0, OPT_DATA_PREFIX}, {"delay", 1, 0, 'd'}, {"enum-formats", 0, 0, OPT_ENUM_FORMATS}, {"enum-inputs", 0, 0, OPT_ENUM_INPUTS}, @@ -2034,6 +2034,7 @@ int main(int argc, char *argv[]) break; case OPT_DATA_PREFIX: dev.write_data_prefix = true; + break; default: printf("Invalid option -%c\n", c); printf("Run %s -h for help.\n", argv[0]);