diff options
author | Ruslan Bukin <br@FreeBSD.org> | 2016-11-19 17:46:18 +0000 |
---|---|---|
committer | Ruslan Bukin <br@FreeBSD.org> | 2016-11-19 17:46:18 +0000 |
commit | 9a8f61fb5b23d8d82a8507d1281894ec24cb1a9b (patch) | |
tree | 9ba634b3ab691fe8fad4e59d57da707cf224666c /bin/dd | |
parent | 9caeb4305d450a253ccf9ada6c5d604fa3e5e969 (diff) | |
download | src-9a8f61fb5b23d8d82a8507d1281894ec24cb1a9b.tar.gz src-9a8f61fb5b23d8d82a8507d1281894ec24cb1a9b.zip |
Bring in support for Ingenic XBurst JZ4780 and
X1000 systems on chips.
Imgtec CI20 and Ingenic CANNA boards supported.
Submitted by: Alexander Kabaev <kan@FreeBSD.org>
Reviewed by: Ruslan Bukin <br@FreeBSD.org>
Sponsored by: DARPA, AFRL
Notes
Notes:
svn path=/head/; revision=308857
Diffstat (limited to 'bin/dd')
-rw-r--r-- | bin/dd/dd.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c index a13213dcc8c6..56f8efef7a53 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -48,13 +48,10 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/stat.h> #include <sys/conf.h> -#include <sys/capsicum.h> #include <sys/disklabel.h> #include <sys/filio.h> -#include <sys/mtio.h> #include <assert.h> -#include <capsicum_helpers.h> #include <ctype.h> #include <err.h> #include <errno.h> @@ -95,10 +92,6 @@ main(int argc __unused, char *argv[]) jcl(argv); setup(); - caph_cache_catpages(); - if (cap_enter() == -1 && errno != ENOSYS) - err(1, "unable to enter capability mode"); - (void)signal(SIGINFO, siginfo_handler); (void)signal(SIGINT, terminate); @@ -132,8 +125,6 @@ static void setup(void) { u_int cnt; - cap_rights_t rights; - unsigned long cmds[] = { FIODTYPE, MTIOCTOP }; if (in.name == NULL) { in.name = "stdin"; @@ -142,20 +133,13 @@ setup(void) in.fd = open(in.name, O_RDONLY, 0); if (in.fd == -1) err(1, "%s", in.name); - if (caph_limit_stdin() == -1) - err(1, "unable to limit capability rights"); } getfdtype(&in); - cap_rights_init(&rights, CAP_READ, CAP_SEEK); - if (cap_rights_limit(in.fd, &rights) == -1 && errno != ENOSYS) - err(1, "unable to limit capability rights"); - if (files_cnt > 1 && !(in.flags & ISTAPE)) errx(1, "files is not supported for non-tape devices"); - cap_rights_set(&rights, CAP_WRITE, CAP_FTRUNCATE, CAP_IOCTL); if (out.name == NULL) { /* No way to check for read access here. */ out.fd = STDOUT_FILENO; @@ -172,27 +156,13 @@ setup(void) if (out.fd == -1) { out.fd = open(out.name, O_WRONLY | OFLAGS, DEFFILEMODE); out.flags |= NOREAD; - cap_rights_clear(&rights, CAP_READ); } if (out.fd == -1) err(1, "%s", out.name); - if (caph_limit_stdout() == -1) - err(1, "unable to limit capability rights"); } getfdtype(&out); - if (cap_rights_limit(out.fd, &rights) == -1 && errno != ENOSYS) - err(1, "unable to limit capability rights"); - if (cap_ioctls_limit(out.fd, cmds, nitems(cmds)) == -1 && - errno != ENOSYS) - err(1, "unable to limit capability rights"); - - if (in.fd != STDERR_FILENO && out.fd != STDERR_FILENO) { - if (caph_limit_stderr() == -1) - err(1, "unable to limit capability rights"); - } - /* * Allocate space for the input and output buffers. If not doing * record oriented I/O, only need a single buffer. |