From 8bfb5fa91977a4b10d7ad87fe4627c236f841137 Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Thu, 30 Aug 2018 12:00:27 -0700 Subject: fs: Add empty dir at /sys/class/power_supply. PiperOrigin-RevId: 210953512 Change-Id: I07d2d7fb0d268aa8eca26d81ef28b5b5c42289ee --- pkg/sentry/fs/sys/sys.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkg/sentry/fs') 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), -- cgit v1.2.3