diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/acl.html | 16 | ||||
-rw-r--r-- | linux/coredump.html | 2 | ||||
-rw-r--r-- | linux/input.html | 14 | ||||
-rw-r--r-- | linux/swap.html | 2 | ||||
-rw-r--r-- | linux/systemd.html | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/linux/acl.html b/linux/acl.html index dd710f7..9b9e9e1 100644 --- a/linux/acl.html +++ b/linux/acl.html @@ -202,17 +202,17 @@ drwxrwxr-x+ 2 root root 4 11. Jun 14:26 foo/ getfacl /tank/foo </code></pre> <h2 id="modify-acl-entries"><a class="header" href="#modify-acl-entries">Modify acl entries</a></h2> -<pre><code class="language-bash"># Add acl entry for user "user123". -setfacl -m "u:user123:rwx" /tank/foo +<pre><code class="language-bash"># Add acl entry for user "user123". +setfacl -m "u:user123:rwx" /tank/foo -# Remove entry for user "user123". -setfacl -x "u:user123" /tank/foo +# Remove entry for user "user123". +setfacl -x "u:user123" /tank/foo -# Add acl entry for group "group456". -setfacl -m "g:group456:rx" /tank/foo +# Add acl entry for group "group456". +setfacl -m "g:group456:rx" /tank/foo # Add acl entry for others. -setfacl -m "o:rx" /tank/foo +setfacl -m "o:rx" /tank/foo # Remove extended acl entries. setfacl -b /tank/foo @@ -221,7 +221,7 @@ setfacl -b /tank/foo <p>The <code>mask</code> defines the maximum access rights that can be given to <strong>users</strong> and <strong>groups</strong>.</p> <pre><code class="language-bash"># Update the mask. -setfacl -m "m:rx" /tank/foo +setfacl -m "m:rx" /tank/foo # List acl entries. getfacl /tank/foo diff --git a/linux/coredump.html b/linux/coredump.html index 9ec6ef8..f3526a7 100644 --- a/linux/coredump.html +++ b/linux/coredump.html @@ -201,7 +201,7 @@ In a typical bash/zsh this can be done as</p> /proc/sys/kernel/core_uses_pid - 1 => Append ".<pid>" suffic to the coredump file name + 1 => Append ".<pid>" suffic to the coredump file name (pid of the dumping process). 0 => Do not append the suffix. </code></pre> diff --git a/linux/input.html b/linux/input.html index b1cd7be..53d0a32 100644 --- a/linux/input.html +++ b/linux/input.html @@ -216,7 +216,7 @@ file <code>/proc/bus/input/devices</code> in the proc filesystem can be consulte <p>This yields entries as follows and shows which <code>Handlers</code> are assigned to which <code>Name</code>.</p> <pre><code>I: Bus=0018 Vendor=04f3 Product=0033 Version=0000 -N: Name="Elan Touchpad" +N: Name="Elan Touchpad" ... H: Handlers=event15 mouse0 ... @@ -241,9 +241,9 @@ struct input_event { const char* type(unsigned short t) { static char buf[32]; - const char* fmt = "0x%x"; + const char* fmt = "0x%x"; switch (t) { -#define FMT(TYPE) case TYPE: fmt = #TYPE"(0x%x)"; break +#define FMT(TYPE) case TYPE: fmt = #TYPE"(0x%x)"; break FMT(EV_SYN); FMT(EV_KEY); FMT(EV_REL); @@ -256,9 +256,9 @@ const char* type(unsigned short t) { const char* code(unsigned short c) { static char buf[32]; - const char* fmt = "0x%x"; + const char* fmt = "0x%x"; switch (c) { -#define FMT(CODE) case CODE: fmt = #CODE"(0x%x)"; break +#define FMT(CODE) case CODE: fmt = #CODE"(0x%x)"; break FMT(BTN_LEFT); FMT(BTN_RIGHT); FMT(BTN_MIDDLE); @@ -274,7 +274,7 @@ const char* timefmt(const struct timeval* t) { assert(t); struct tm* lt = localtime(&t->tv_sec); // Returns pointer to static tm object. static char buf[64]; - strftime(buf, sizeof(buf), "%H:%M:%S", lt); + strftime(buf, sizeof(buf), "%H:%M:%S", lt); return buf; } @@ -288,7 +288,7 @@ int main(int argc, char* argv[]) { while (1) { int ret = read(fd, &inp, sizeof(inp)); assert(ret == sizeof(inp)); - printf("time: %s type: %s code: %s value: 0x%x\n", + printf("time: %s type: %s code: %s value: 0x%x\n", timefmt(&inp.time), type(inp.type), code(inp.code), inp.value); } } diff --git a/linux/swap.html b/linux/swap.html index 4c57a93..47995bc 100644 --- a/linux/swap.html +++ b/linux/swap.html @@ -195,7 +195,7 @@ mkswap /swapfile swapon /swapfile # Persistent setup of swap file. -echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab +echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab # Disable swap file (until next reboot). swapoff /swapfile diff --git a/linux/systemd.html b/linux/systemd.html index a553d3d..3348256 100644 --- a/linux/systemd.html +++ b/linux/systemd.html @@ -217,7 +217,7 @@ Description=Test logger [Service] Type=oneshot -ExecStart=logger "Hello from test unit"' > ~/.config/systemd/user/test.service +ExecStart=logger "Hello from test unit"' > ~/.config/systemd/user/test.service # Run unit systemctl --user start test |