summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-07-11 21:31:14 +0100
committerLars Wirzenius <liw@liw.fi>2012-07-11 21:31:14 +0100
commit7df6b76ef9c06107eb83c1f71c3e583eaa9d2c79 (patch)
tree6fced585f19150928f2b979827a27f2daee4c348
parent3db91a5854ddf3fe8843c5e141c11d69fb7b61b5 (diff)
downloadextrautils-7df6b76ef9c06107eb83c1f71c3e583eaa9d2c79.tar.gz
Remove errno, now in moreutils
-rwxr-xr-xerrno30
-rw-r--r--errno.151
2 files changed, 0 insertions, 81 deletions
diff --git a/errno b/errno
deleted file mode 100755
index ba95105..0000000
--- a/errno
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/python
-
-import errno
-import os
-import sys
-
-names = [name for name in dir(errno) if name.startswith('E')]
-codes = dict((name, getattr(errno, name)) for name in names)
-texts = dict((name, os.strerror(codes[name])) for name in names)
-
-def report(name):
- print name, codes[name], texts[name]
-
-for arg in sys.argv[1:]:
- if arg in names:
- report(arg)
- else:
- for name, code in codes.iteritems():
- if arg == str(code):
- report(name)
- break
- else:
- found = False
- for name, text in texts.iteritems():
- if arg.lower() in text.lower():
- report(name)
- found = True
- if not found:
- print 'Unknown:', arg
-
diff --git a/errno.1 b/errno.1
deleted file mode 100644
index aefb0ff..0000000
--- a/errno.1
+++ /dev/null
@@ -1,51 +0,0 @@
-.\" errno.1 - manual page for the errno command
-.\" Copyright (C) 2009 Lars Wirzenius
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
-.\"
-.TH ERRNO 1
-.SH NAME
-errno \- look up errno codes or names
-.SH SYNOPSIS
-.B errno
-.RI [ code | name ]...
-.SH DESCRIPTION
-.B errno
-prints the description of
-.BR errno (3)
-values, from the command line.
-It can look descriptions based on the numeric code or names like
-.BR EEXIST .
-.PP
-For example, to look up what the code 2 means:
-.sp 1
-.nf
-.RS
-$ errno 2
-ENOENT 2 No such file or directory
-.RE
-.fi
-.sp 1
-Similarly, to look up what the code EEXIST means:
-.sp 1
-.nf
-.RS
-$ errno EEXIST
-EEXIST 17 File exists
-.RE
-.fi
-.sp 1
-Note that the output always lists both the name and the code.
-.SH "SEE ALSO"
-.BR errno (3).