All of lore.kernel.org
 help / color / mirror / Atom feed
From: =?unknown-8bit?q?Beno=C3=AEt?= Monin <benoit.monin@gmx.fr>
To: ofono@ofono.org
Subject: Re: [PATCH] hso: Set modem name based on udev network interface name
Date: Mon, 25 Oct 2010 11:13:28 +0200	[thread overview]
Message-ID: <20101025091609.178830@gmx.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

Hi Denis,

> De : Denis Kenzior
> 
> Hi Benoît,
> 
> I prefer you do this in plugins/hso and not in udev.
> 
Is the patch below correct ? I moved the call to set_name
to hso_probe.

Benoît
--
Subject: [PATCH] hso: Set modem name based on udev network interface name

Useful if you have multiple identical modems and you need a way
to know which modem you're talking to.
---
 plugins/hso.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/plugins/hso.c b/plugins/hso.c
index 055c63b..a9fb1ba 100644
--- a/plugins/hso.c
+++ b/plugins/hso.c
@@ -59,6 +59,7 @@ struct hso_data {
 static int hso_probe(struct ofono_modem *modem)
 {
        struct hso_data *data;
+       const char *interface;

        DBG("%p", modem);

@@ -68,6 +69,11 @@ static int hso_probe(struct ofono_modem *modem)

        ofono_modem_set_data(modem, data);

+       /* Set name based on network interface name */
+       interface = ofono_modem_get_string(modem, "NetworkInterface");
+       if (interface)
+               ofono_modem_set_name(modem, interface);
+
        return 0;
 }

--

             reply	other threads:[~2010-10-25  9:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25  9:13 =?unknown-8bit?q?Beno=C3=AEt?= Monin [this message]
2010-10-25 11:17 ` [PATCH] hso: Set modem name based on udev network interface name Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2010-10-25 11:35 =?unknown-8bit?q?Beno=C3=AEt?= Monin
2010-10-25 12:15 ` Marcel Holtmann
2010-11-07 20:32   ` =?unknown-8bit?q?Beno=C3=AEt?= Monin
2010-10-21  8:26 =?unknown-8bit?q?Beno=C3=AEt?= Monin
2010-10-22 15:39 ` Denis Kenzior

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=20101025091609.178830@gmx.com \
    --to=benoit.monin@gmx.fr \
    --cc=ofono@ofono.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.