Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5864440ybh; Wed, 7 Aug 2019 12:47:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqy80jI55iONwaZL1w3tTmK+YGkT2hQ1NMC026cm1a5ZPPzHwjQ3an2e5begfdqynlbY7FFQ X-Received: by 2002:a62:2d3:: with SMTP id 202mr11249288pfc.131.1565207219830; Wed, 07 Aug 2019 12:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565207219; cv=none; d=google.com; s=arc-20160816; b=iSP+XGYvEwEpUlTI6QsuxT8hJ3y53FCqNiGaVPwdk2vzA40Niffkd9m2nSoSxi0WER aDqCfvevdcMBIpZ4MfUKRLOIEwHtoUhfKykAahicHGckZ+384/OG2oTN6EYNqPIR9rQT b8tRbae8ZYyhScDbw2Q6T22FJcloGPzBWuBATkpKchnWr7tsV3Y8hW+QFqK29Zxy4s5S fsLZLlD5wxNFA29uMujgvlVNEzx12T/4RCWEX4k94IyAKSO2RJPAZhq1R2QgzVeLuDXO MqWVo3VMAopdflvfuf32RuT807EwDDq9e5nH2Or1NYvvyjBQbs8wPGWWusDKlPkuELcF q3+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=Sqq0lqWUCq9dMBEEFNWMZ4PIZj3OVwOU0Sa5NyDRXBU=; b=DBXfc/x9hDKpGRSbcW7Ad00/S5vY8ffDAFeFjDdDDAoycZ7qvfes9a3HBapV9XSNGh qq/NDD6YzN1+lZZ7bo4J2jWrvsAQl2ucD00jWOQzWXUf+o7nQDSE7VjbGRRr4mZx/Fo6 O848jNou2ZkSFz5d27WwA6xcv/2ilQGE5OlIvsT93jjJSaO70wMsCW0vMWNgcpz46F05 geko1tGPYTz1fdlEnGFOvQXCrGPBu7esB8Vh/cK7xUIDV1CeV5jugmRBQSxakiwGBJx4 UHihoGGPd7s2Pl3aMPtjzk8KHkTl2jsRcckFXEZ7pgOwg5VD4du5tot4mob2boyXUfpf RnNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s186si12092967pgs.116.2019.08.07.12.46.44; Wed, 07 Aug 2019 12:46:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388468AbfHGT1w (ORCPT + 99 others); Wed, 7 Aug 2019 15:27:52 -0400 Received: from mga14.intel.com ([192.55.52.115]:39923 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730498AbfHGT1w (ORCPT ); Wed, 7 Aug 2019 15:27:52 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2019 12:27:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,358,1559545200"; d="p7s'?scan'208";a="186104475" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga002.jf.intel.com with ESMTP; 07 Aug 2019 12:27:51 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.157]) by ORSMSX102.amr.corp.intel.com ([169.254.3.11]) with mapi id 14.03.0439.000; Wed, 7 Aug 2019 12:27:51 -0700 From: "Stotland, Inga" To: "luiz.dentz@gmail.com" CC: "linux-bluetooth@vger.kernel.org" , "Gix, Brian" Subject: Re: [PATCH BlueZ 1/2] shared/shell: Add ell based shell implementation Thread-Topic: [PATCH BlueZ 1/2] shared/shell: Add ell based shell implementation Thread-Index: AQHVTOwMmOEJi3L8DEaa3XqouHZdNabv/0+AgACIloA= Date: Wed, 7 Aug 2019 19:27:49 +0000 Message-ID: <85b99cb25198769fe1455630e345266e657e86ad.camel@intel.com> References: <20190807064747.6725-1-inga.stotland@intel.com> <20190807064747.6725-2-inga.stotland@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.255.229.206] Content-Type: multipart/signed; micalg=sha-1; protocol="application/x-pkcs7-signature"; boundary="=-yvZSdMZ8eD46cBnpbNjI" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --=-yvZSdMZ8eD46cBnpbNjI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Luiz, On Wed, 2019-08-07 at 14:18 +0300, Luiz Augusto von Dentz wrote: > Hi Inga, >=20 > On Wed, Aug 7, 2019 at 9:47 AM Inga Stotland > wrote: > > This adds the functionality of bt_shell that uses ell > > mainloop. > > " > > + > > +static void quit_on_timeout(struct l_timeout *timeout, void > > *user_data) > > +{ > > + l_main_quit(); > > +} > > + > > +bool bt_shell_attach(int fd) > > +{ > > + struct l_io *io; > > + > > + /* TODO: Allow more than one input? */ > > + if (data.input) > > + return false; > > + > > + io =3D l_io_new(fd); > > + > > + if (!data.mode) > > + l_io_set_read_handler(io, input_read, NULL, NULL); > > + > > + l_io_set_disconnect_handler(io, io_hup, NULL, NULL); >=20 > There is an io abstraction to implement this, afaik most of the > things > here are just copy+paste of shell.c just with a different mainloop > and > IO while the io.h and mainloop.h are exactly to abstract these so I > wonder why you took this alternative. >=20 True. Much easier to add ell-based mainloop.c, same effect and lightweight. Regards, Inga --=-yvZSdMZ8eD46cBnpbNjI Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKbDCCBOsw ggPToAMCAQICEDabxALowUBS+21KC0JI8fcwDQYJKoZIhvcNAQEFBQAwbzELMAkGA1UEBhMCU0Ux FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5hbCBUVFAgTmV0 d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9vdDAeFw0xMzEyMTEwMDAwMDBa Fw0yMDA1MzAxMDQ4MzhaMHkxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEUMBIGA1UEBxMLU2Fu dGEgQ2xhcmExGjAYBgNVBAoTEUludGVsIENvcnBvcmF0aW9uMSswKQYDVQQDEyJJbnRlbCBFeHRl cm5hbCBCYXNpYyBJc3N1aW5nIENBIDRCMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA yzuW/y/g0bznz8BD48M94luFzqHaqY9yGN9H/W0J7hOVBpl0rTQJ6kZ7z7hyDb9kf2UW4ZU25alC i+q5m6NwHg+z9pcN7bQ84SSBueaYF7cXlAg7z3XyZbzSEYP7raeuWRf5fYvYzq8/uI7VNR8o/43w PtDP10YDdO/0J5xrHxnC/9/aU+wTFSVsPqxsd7C58mnu7G4VRJ0n9PG4SfmYNC0h/5fLWuOWhxAv 6MuiK7MmvTPHLMclULgJqVSqG1MbBs0FbzoRHne4Cx0w6rtzPTrzo+bTRqhruaU18lQkzB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