How to add poll function to the kernel module code?

You can find some good examples in kernel itself. Take a look at next files: drivers/rtc/dev.c, drivers/rtc/interface.c kernel/printk/printk.c drivers/char/random.c To add poll() function to your code follow next steps. Include needed headers: #include <linux/wait.h> #include <linux/poll.h> Declare waitqueue variable: static DECLARE_WAIT_QUEUE_HEAD(fortune_wait); Add fortune_poll() function and add it (as .poll callback) to your file operations structure: … Read more

Downloading a file at a specified location through python and selenium using Chrome driver

I found the accepted solution didn’t work, however this slight change did: from selenium import webdriver chrome_options = webdriver.ChromeOptions() prefs = {‘download.default_directory’ : ‘/path/to/dir’} chrome_options.add_experimental_option(‘prefs’, prefs) driver = webdriver.Chrome(chrome_options=chrome_options)