Skip to content

Cannot use relative paths (as symlinks to devices) #10

Description

@ydirson

I have created symlinks into /dev/serial/by-id/ to help working with several usb/serial adapters. I cannot refer to them using a relative path:

$ strace -efile bt ./ttyA35 
...
openat(AT_FDCWD, "/dev/./ttyA35", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
Trying port ./ttyA35... Failed! (No such file or directory)
Failed to open port: No such file or directory
+++ exited with 2 +++

A workaround is to use bt $PWD/ttyA35 but it's pretty ugly :)

Probably the argument should be considered a usual relative pass when it contains a / ?

Is it really that much of a gain to spare the user from typing /dev/ when he likely has to enter tty anyway ? I'd think a string without a / would make more sense to use as bt USB0, but I guess it can be a matter of taste...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions