Product / vendor on mobile download

Linus Torvalds torvalds at linux-foundation.org
Wed Jun 20 23:53:26 PDT 2018


On Thu, Jun 21, 2018 at 3:17 PM Thomas Fänge <thomas.fange at gmail.com> wrote:
>
> Still the same error from libdivecomputer:
>
>     INFO: Open: name=ftdi
>     ERROR: No such file or directory (2) [in /data/android/subsurface/libdivecomputer/src/serial_posix.c:295 (dc_serial_open)]

Note: this is "normal".

The DC_TRANSPORT_SERIAL first just calls dc_serial_open(), and only if
that fails will it then try to fall back on the "ftdi_open()" case.

                rc = dc_serial_open(&data->iostream, context, data->devname);
                if (rc == DC_STATUS_SUCCESS)
                        return rc;

  #ifdef SERIAL_FTDI
                if (!strcmp(data->devname, "ftdi")) {
                        rc = ftdi_open(&data->iostream, context);
                        if (rc == DC_STATUS_SUCCESS)
                                return rc;
                }
  #endif

so an error from dc_serial_open() is actually expected.

I guess we could move the ftdi check up.

If the FTDI open fails, it should print an error message right *after*
the one from dc_serial_open(). But you cut out the rest of the
output..

             Linus


More information about the subsurface mailing list