[systemd-devel] Problem with netwrok broadband modem
lennart at poettering.net
Fri Jul 1 17:01:24 PDT 2011
On Mon, 27.06.11 14:59, Christian Gagneraud (chris at techworks.ie) wrote:
> On 27/06/11 12:54, Lennart Poettering wrote:
> >On Fri, 24.06.11 15:59, Christian Gagneraud (chris at techworks.ie) wrote:
> >>I'm trying to use a USB broadband modem with ofono and connman, when
> >>i plug the modem, i get an error from systemd "Failed to load device
> >>unit: Invalid argument" (full log below).
> >Hmm, this smells like a bug in systemd.
> >Do you have any service file for this device installed?
> >>Is it looking for a dev-tty at .device file?
> >Yes, but usually this should just fail with ENOENT and be ignored. For
> >some reason this generates EINVAL for you however.
> >>As i'm having trouble to get ofono working, I wonder if the problem
> >>doesn't come from here instead, or even perhaps it's due to the
> >>manufaturer and serial number of the USB device being garbage...
> >That could actually be. Of course we should fix systemd to handle this.
> >I wonder how I could easily reproduce this issue here, without that hw.
> >My first guess is that i's actually the length of the name, and not the
> >contents of it that triggers the EINVAL.
> Could you point me to the right source file and/or functions where I
> could add some debug statement to see if these garbage in the name
> cause troubles.
The various files in unit-name.h are probably the right place for this:
unit_name_is_valid_no_type() in particular. My guess is that the
strlen() check in there is simply the cause of failure.
BTW, could you paste the output of "udevadm info -qall
-p/sys/class/tty/ttyXX" for the tty in question? This might give me a
hint what systemd is choking on without the debug data from
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel