1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg
Daniel Sweet 0485e53675 Use correct LOOP_CTL_GET_FREE API in pkg/loopback
The `ioctl` interface for the `LOOP_CTL_GET_FREE` request on
`/dev/loop-control` is a little different from what `unix.IoctlGetInt`
expects: the first index is the returned status in `r1`, not an `int`
pointer as the first parameter.

Unfortunately we have to go a little lower level to get the appropriate
loop device index out, using `unix.Syscall` directly to read from
`r1`. Internally, the index is returned as a signed integer to match the
internal `ioctl` expectations of interpreting a negative signed integer
as an error at the userspace ABI boundary, so the direct interface of
`ioctlLoopCtlGetFree` can remain as-is.

[@kolyshkin: it still worked before this fix because of
/dev scan fallback in ioctlLoopCtlGetFree()]

Signed-off-by: Daniel Sweet <danieljsweet@icloud.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit db2bc43017)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-09-02 18:38:22 +03:00
..
aaparser
archive pkg/archive: keep walkRoot clean if source is / 2019-06-14 04:02:08 +00:00
authorization Format code with gofmt -s from go-1.11beta1 2018-09-06 15:24:16 -07:00
broadcaster
capabilities Add more import comments 2019-04-10 16:59:33 +02:00
chrootarchive Add realChroot for non linux/windows 2019-08-08 18:15:26 +02:00
containerfs Add ADD/COPY --chown flag support to Windows 2018-08-13 21:59:11 -07:00
devicemapper
directory
discovery
dmesg
filenotify pkg/filenotify/poller: fix Close() 2018-08-29 22:16:04 -07:00
fileutils Remove duplicated words in pkg files 2018-10-05 22:32:14 +08:00
fsutils
homedir allow running dockerd in an unprivileged user namespace (rootless mode) 2019-02-04 00:24:27 +09:00
idtools Stop sorting uid and gid ranges in id maps 2019-06-05 14:46:55 +02:00
ioutils
jsonmessage replace gotty with aec, since gotty hasn't been updated since very long time and aec can drop in for gotty 2019-01-16 22:10:39 +05:30
locker
longpath
loopback Use correct LOOP_CTL_GET_FREE API in pkg/loopback 2019-09-02 18:38:22 +03:00
mount fix parseInfoFile does not handle spaces in filenames 2019-04-02 13:09:26 +02:00
namesgenerator Add Satoshi Nakamoto to names generator 2019-04-23 10:32:53 +02:00
parsers Skip kernel-memory tests on RHEL/CentOS daemons 2019-01-04 13:27:46 +01:00
pidfile
platform
plugingetter
plugins Harden TestClientWithRequestTimeout 2019-08-14 15:21:34 +02:00
pools
progress pkg/progress: work around closing closed channel panic 2018-09-06 20:20:12 +00:00
pubsub
reexec
signal pkg/signal.TestTrap: use a subtest 2019-01-12 18:04:44 +01:00
stdcopy
streamformatter Remove duplicated words in pkg files 2018-10-05 22:32:14 +08:00
stringid Entropy cannot be saved 2019-06-11 17:40:09 +02:00
symlink Update LICENSE 2018-09-12 14:27:53 +01:00
sysinfo Refactor pkg/sysinfo 2019-02-04 00:38:12 +01:00
system LCOW: (Experimental) Require RS5+ builds 2019-04-18 09:43:37 -07:00
tailfile Use assert.NilError() instead of assert.Assert() 2019-01-21 13:16:02 +01:00
tarsum pkg/tarsum: fix unit test for Go 1.11+ 2018-07-19 10:38:45 +03:00
term Fix #28814 2018-08-07 10:20:13 +02:00
truncindex Entropy cannot be saved 2019-06-11 17:40:09 +02:00
urlutil
useragent
README.md

pkg/ is a collection of utility packages used by the Moby project without being specific to its internals.

Utility packages are kept separate from the moby core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Moby organization, to facilitate re-use by other projects. However that is not the priority.

The directory pkg is named after the same directory in the camlistore project. Since Brad is a core Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!

Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!