diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-08-30 12:00:27 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-30 12:01:27 -0700 |
commit | 8bfb5fa91977a4b10d7ad87fe4627c236f841137 (patch) | |
tree | cf22074a29e4d461d6f1e901ee48f226694349f3 /pkg/sentry | |
parent | 313d4af52d774b07d4b98d770d38684c9c119f67 (diff) |
fs: Add empty dir at /sys/class/power_supply.
PiperOrigin-RevId: 210953512
Change-Id: I07d2d7fb0d268aa8eca26d81ef28b5b5c42289ee
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/fs/sys/sys.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/sentry/fs/sys/sys.go b/pkg/sentry/fs/sys/sys.go index b1c3d48eb..7b9697668 100644 --- a/pkg/sentry/fs/sys/sys.go +++ b/pkg/sentry/fs/sys/sys.go @@ -56,9 +56,11 @@ func New(ctx context.Context, msrc *fs.MountSource) *fs.Inode { // Add a basic set of top-level directories. In Linux, these // are dynamically added depending on the KConfig. Here we just // add the most common ones. - "block": newDir(ctx, msrc, nil), - "bus": newDir(ctx, msrc, nil), - "class": newDir(ctx, msrc, nil), + "block": newDir(ctx, msrc, nil), + "bus": newDir(ctx, msrc, nil), + "class": newDir(ctx, msrc, map[string]*fs.Inode{ + "power_supply": newDir(ctx, msrc, nil), + }), "dev": newDir(ctx, msrc, nil), "devices": newDevicesDir(ctx, msrc), "firmware": newDir(ctx, msrc, nil), |