Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow '/' in character device name

Accomodate character devices kept in a directory under /dev, e.g.,
the tun device in /dev/net/tun.
  • Loading branch information...
commit 31e7592adc1be22a750a6ee8db914a32cefaa6d4 1 parent 2561888
@msantos authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  c_src/procket_cmd.c
  2. +1 −1  src/procket.erl
View
2  c_src/procket_cmd.c
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
usage(ps);
for (p = ps->dev; *p; p++) {
- if (!islower(*p) && !isdigit(*p))
+ if (!islower(*p) && !isdigit(*p) && *p != '/')
usage(ps);
}
}
View
2  src/procket.erl
@@ -254,7 +254,7 @@ is_interface(Name) when is_list(Name) ->
is_device(Name) when is_list(Name) ->
Name == [C || C <- Name, ((C >= $a) and (C =< $z))
- or ((C >= $0) and (C =< $9))].
+ or ((C >= $0) and (C =< $9) or (C == $/))].
progname() ->
filename:join([
Please sign in to comment.
Something went wrong with that request. Please try again.