CharacterDevice.h 467 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <Kernel/Devices/Device.h>
  8. namespace Kernel {
  9. class CharacterDevice : public Device {
  10. public:
  11. virtual ~CharacterDevice() override;
  12. protected:
  13. CharacterDevice(unsigned major, unsigned minor)
  14. : Device(major, minor)
  15. {
  16. }
  17. private:
  18. virtual bool is_character_device() const final { return true; }
  19. };
  20. }