smdev, branch HEAD suckless mdev 8d07540c417e3a31942028318197c89b640278d5 2015-04-12T11:42:20Z 2015-04-14T11:19:41Z config.mk: default CC = cc Hiltjo Posthuma hiltjo@codemadness.org commit 8d07540c417e3a31942028318197c89b640278d5 parent 0874cdcfbe0b1d1f3d3d0fa52d226bb6c4c46482 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 12 Apr 2015 13:42:20 +0200 config.mk: default CC = cc 0874cdcfbe0b1d1f3d3d0fa52d226bb6c4c46482 2015-02-28T07:30:21Z 2015-02-28T07:30:52Z Hardcode the name in simevent usage sin sin@2f30.org commit 0874cdcfbe0b1d1f3d3d0fa52d226bb6c4c46482 parent f8534bbc2f38111b8756c91c6f41ccd557dec2a1 Author: sin <sin@2f30.org> Date: Sat, 28 Feb 2015 07:30:21 +0000 Hardcode the name in simevent usage f8534bbc2f38111b8756c91c6f41ccd557dec2a1 2015-02-27T22:45:37Z 2015-02-27T22:45:56Z Add updated simevent by emg sin sin@2f30.org commit f8534bbc2f38111b8756c91c6f41ccd557dec2a1 parent fb09fb0c621fa0a38147c93345316b3213e46f80 Author: sin <sin@2f30.org> Date: Fri, 27 Feb 2015 22:45:37 +0000 Add updated simevent by emg fb09fb0c621fa0a38147c93345316b3213e46f80 2014-09-29T10:55:09Z 2014-09-29T10:55:31Z Bump up to 0.2.3 sin sin@2f30.org commit fb09fb0c621fa0a38147c93345316b3213e46f80 parent f56970a8898e8a905548a62a765f6b38e978512d Author: sin <sin@2f30.org> Date: Mon, 29 Sep 2014 11:55:09 +0100 Bump up to 0.2.3 f56970a8898e8a905548a62a765f6b38e978512d 2014-09-28T13:02:33Z 2014-09-28T13:02:51Z Strip by default sin sin@2f30.org commit f56970a8898e8a905548a62a765f6b38e978512d parent 90f6363c5771f1cbfde3bc7f8dd125ac0c7959bf Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 14:02:33 +0100 Strip by default 90f6363c5771f1cbfde3bc7f8dd125ac0c7959bf 2014-09-28T12:18:34Z 2014-09-28T12:19:13Z Do not name parameters in mkpath.h either sin sin@2f30.org commit 90f6363c5771f1cbfde3bc7f8dd125ac0c7959bf parent 4dadb2182fb9d710eb110159c298a5591c784eaa Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 13:18:34 +0100 Do not name parameters in mkpath.h either 4dadb2182fb9d710eb110159c298a5591c784eaa 2014-09-28T12:17:53Z 2014-09-28T12:18:05Z Add bin/ sin sin@2f30.org commit 4dadb2182fb9d710eb110159c298a5591c784eaa parent b2b6178585f9f3d610fa1638c2dd3032396171ea Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 13:17:53 +0100 Add bin/ b2b6178585f9f3d610fa1638c2dd3032396171ea 2014-09-28T12:16:50Z 2014-09-28T12:17:31Z Just default to cc and if needed one can modify the existing CC in config.mk sin sin@2f30.org commit b2b6178585f9f3d610fa1638c2dd3032396171ea parent f7f1f9c2bac6cf9dfef71df7b88f1e326adca245 Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 13:16:50 +0100 Just default to cc and if needed one can modify the existing CC in config.mk f7f1f9c2bac6cf9dfef71df7b88f1e326adca245 2014-09-28T12:13:20Z 2014-09-28T12:13:31Z No need to name parameters sin sin@2f30.org commit f7f1f9c2bac6cf9dfef71df7b88f1e326adca245 parent 3e1d567dc9d45cb9d655471a41a6731900d199a7 Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 13:13:20 +0100 No need to name parameters 3e1d567dc9d45cb9d655471a41a6731900d199a7 2014-09-28T11:31:18Z 2014-09-28T11:31:29Z Update README sin sin@2f30.org commit 3e1d567dc9d45cb9d655471a41a6731900d199a7 parent d660ed761013bac5224ddb91d7085415a750ace8 Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 12:31:18 +0100 Update README d660ed761013bac5224ddb91d7085415a750ace8 2014-09-28T11:28:21Z 2014-09-28T11:28:52Z Add README sin sin@2f30.org commit d660ed761013bac5224ddb91d7085415a750ace8 parent 216a9385f61d56082271603bb193abc12b03b531 Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 12:28:21 +0100 Add README 216a9385f61d56082271603bb193abc12b03b531 2014-09-28T11:26:08Z 2014-09-28T11:28:46Z No need to build with debug symbols by default sin sin@2f30.org commit 216a9385f61d56082271603bb193abc12b03b531 parent 60fe76e50c7df18ffead3abc6fcc8f1945452788 Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 12:26:08 +0100 No need to build with debug symbols by default 60fe76e50c7df18ffead3abc6fcc8f1945452788 2014-09-28T11:19:43Z 2014-09-28T11:20:29Z Add missing include to fix musl build sin sin@2f30.org commit 60fe76e50c7df18ffead3abc6fcc8f1945452788 parent 0238a2fab7e0babe4e868c30c9605672fedf21bc Author: sin <sin@2f30.org> Date: Sun, 28 Sep 2014 12:19:43 +0100 Add missing include to fix musl build 0238a2fab7e0babe4e868c30c9605672fedf21bc 2014-09-26T13:30:58Z 2014-09-26T13:49:00Z Bump up to v0.2.2 sin sin@2f30.org commit 0238a2fab7e0babe4e868c30c9605672fedf21bc parent 954d75c739bdd1d4862b676a900c74cca43662fe Author: sin <sin@2f30.org> Date: Fri, 26 Sep 2014 14:30:58 +0100 Bump up to v0.2.2 954d75c739bdd1d4862b676a900c74cca43662fe 2014-09-26T13:29:50Z 2014-09-26T13:48:58Z Add comment in config.def.h about renaming network interfaces sin sin@2f30.org commit 954d75c739bdd1d4862b676a900c74cca43662fe parent dc6e28514e67731f1e4ed6bda8f411f2fcd0ac5d Author: sin <sin@2f30.org> Date: Fri, 26 Sep 2014 14:29:50 +0100 Add comment in config.def.h about renaming network interfaces dc6e28514e67731f1e4ed6bda8f411f2fcd0ac5d 2014-09-04T14:58:25Z 2014-09-04T14:58:25Z Remove nonsense from TODO sin sin@2f30.org commit dc6e28514e67731f1e4ed6bda8f411f2fcd0ac5d parent 4eeff1ea12111e7e1cdfeae0469da7198c8e6fbd Author: sin <sin@2f30.org> Date: Thu, 4 Sep 2014 15:58:25 +0100 Remove nonsense from TODO 4eeff1ea12111e7e1cdfeae0469da7198c8e6fbd 2014-09-04T14:55:50Z 2014-09-04T14:55:50Z Reflect failures in the exit status sin sin@2f30.org commit 4eeff1ea12111e7e1cdfeae0469da7198c8e6fbd parent 49b838e3bf8d701ce13795a586ec463656c6c1cd Author: sin <sin@2f30.org> Date: Thu, 4 Sep 2014 15:55:50 +0100 Reflect failures in the exit status 49b838e3bf8d701ce13795a586ec463656c6c1cd 2014-09-04T14:53:36Z 2014-09-04T14:53:36Z Don't treat failure to rename an interface as fatal sin sin@2f30.org commit 49b838e3bf8d701ce13795a586ec463656c6c1cd parent cae0a45a24450800ffa47e4b8cc2d617fca03106 Author: sin <sin@2f30.org> Date: Thu, 4 Sep 2014 15:53:36 +0100 Don't treat failure to rename an interface as fatal cae0a45a24450800ffa47e4b8cc2d617fca03106 2014-09-04T14:27:49Z 2014-09-04T14:29:10Z Pop back one indentation level sin sin@2f30.org commit cae0a45a24450800ffa47e4b8cc2d617fca03106 parent e31c4112308c12cc8b4a88f1910b6996a6053c43 Author: sin <sin@2f30.org> Date: Thu, 4 Sep 2014 15:27:49 +0100 Pop back one indentation level e31c4112308c12cc8b4a88f1910b6996a6053c43 2014-09-04T14:11:24Z 2014-09-04T14:12:46Z Remember to call freeifaddrs() sin sin@2f30.org commit e31c4112308c12cc8b4a88f1910b6996a6053c43 parent eed577a75f4e9ce9658cd83d729a561e18b39b70 Author: sin <sin@2f30.org> Date: Thu, 4 Sep 2014 15:11:24 +0100 Remember to call freeifaddrs() Change return value to void. eed577a75f4e9ce9658cd83d729a561e18b39b70 2014-09-04T14:04:26Z 2014-09-04T14:06:21Z Add support for renaming network interfaces sin sin@2f30.org commit eed577a75f4e9ce9658cd83d729a561e18b39b70 parent 801a44b69bb6d791197e3cd4a442ba1cc079a4cf Author: sin <sin@2f30.org> Date: Thu, 4 Sep 2014 15:04:26 +0100 Add support for renaming network interfaces Since this is the brand new thing, add support for renaming network interfaces in smdev. Simply populate the small mac2names[] table in config.h. By default smdev does not rename network interfaces. There's no command line switch to enable renaming, just add entries to the table and off you go. 801a44b69bb6d791197e3cd4a442ba1cc079a4cf 2014-08-08T21:18:56Z 2014-08-08T21:19:42Z Add Hiltjo Posthuma to LICENSE sin sin@2f30.org commit 801a44b69bb6d791197e3cd4a442ba1cc079a4cf parent eafe5a7f661eb623767900c497d6f2f2ac08c0d2 Author: sin <sin@2f30.org> Date: Fri, 8 Aug 2014 22:18:56 +0100 Add Hiltjo Posthuma to LICENSE eafe5a7f661eb623767900c497d6f2f2ac08c0d2 2014-08-08T21:16:23Z 2014-08-08T21:16:55Z Update TODO sin sin@2f30.org commit eafe5a7f661eb623767900c497d6f2f2ac08c0d2 parent b7219eec52b9e1a9f4e72b61f37be543e42547dc Author: sin <sin@2f30.org> Date: Fri, 8 Aug 2014 22:16:23 +0100 Update TODO b7219eec52b9e1a9f4e72b61f37be543e42547dc 2014-08-08T21:12:27Z 2014-08-08T21:13:18Z Add TODO sin sin@2f30.org commit b7219eec52b9e1a9f4e72b61f37be543e42547dc parent a88e9d1d2cb526fcfb8b44d08ab8ff680bae0ad4 Author: sin <sin@2f30.org> Date: Fri, 8 Aug 2014 22:12:27 +0100 Add TODO a88e9d1d2cb526fcfb8b44d08ab8ff680bae0ad4 2014-08-08T20:42:22Z 2014-08-08T20:43:22Z Bump to 0.2.1 sin sin@2f30.org commit a88e9d1d2cb526fcfb8b44d08ab8ff680bae0ad4 parent b1b09f7896b6d2f3fca3cc0c74a85d9e2f246bfa Author: sin <sin@2f30.org> Date: Fri, 8 Aug 2014 21:42:22 +0100 Bump to 0.2.1 b1b09f7896b6d2f3fca3cc0c74a85d9e2f246bfa 2014-08-02T12:51:52Z 2014-08-02T12:53:06Z Use OpenBSD strlcpy() sin sin@2f30.org commit b1b09f7896b6d2f3fca3cc0c74a85d9e2f246bfa parent b221ca33fd0deb80fadcdf9bd06392f9e2480553 Author: sin <sin@2f30.org> Date: Sat, 2 Aug 2014 13:51:52 +0100 Use OpenBSD strlcpy() I don't remember where the previous implementation comes from and therefore I can't provide appropriate credit. b221ca33fd0deb80fadcdf9bd06392f9e2480553 2014-08-02T12:47:49Z 2014-08-02T12:48:49Z No need for enprintf(1, ...) just use eprintf() sin sin@2f30.org commit b221ca33fd0deb80fadcdf9bd06392f9e2480553 parent 558780ab890c2411bb8d6a8684f985d440681410 Author: sin <sin@2f30.org> Date: Sat, 2 Aug 2014 13:47:49 +0100 No need for enprintf(1, ...) just use eprintf() 558780ab890c2411bb8d6a8684f985d440681410 2014-08-01T21:50:47Z 2014-08-01T21:50:47Z Re-order include sin sin@2f30.org commit 558780ab890c2411bb8d6a8684f985d440681410 parent d5c4a92fcf4bc81eba03164883e584006eb9b4e5 Author: sin <sin@2f30.org> Date: Fri, 1 Aug 2014 22:50:47 +0100 Re-order include d5c4a92fcf4bc81eba03164883e584006eb9b4e5 2014-08-01T19:10:17Z 2014-08-01T20:55:58Z config changes due to the chmod fix + fuse device fbt fbt@fleshless.org commit d5c4a92fcf4bc81eba03164883e584006eb9b4e5 parent 6bc6f96acdf7319ff6a71007d025762a42700a34 Author: fbt <fbt@fleshless.org> Date: Fri, 1 Aug 2014 23:10:17 +0400 config changes due to the chmod fix + fuse device 6bc6f96acdf7319ff6a71007d025762a42700a34 2014-08-01T04:28:12Z 2014-08-01T10:25:58Z chmod existing nodes fbt fbt@fleshless.org commit 6bc6f96acdf7319ff6a71007d025762a42700a34 parent 8296616c9491377f54b82f3fb4ddf4b34b387c4e Author: fbt <fbt@fleshless.org> Date: Fri, 1 Aug 2014 08:28:12 +0400 chmod existing nodes 8296616c9491377f54b82f3fb4ddf4b34b387c4e 2014-07-09T13:45:36Z 2014-07-09T13:47:28Z Only check errno if getpw*() fails sin sin@2f30.org commit 8296616c9491377f54b82f3fb4ddf4b34b387c4e parent 230e1118843ba0d3acc70c7746a5a22026b25769 Author: sin <sin@2f30.org> Date: Wed, 9 Jul 2014 14:45:36 +0100 Only check errno if getpw*() fails 230e1118843ba0d3acc70c7746a5a22026b25769 2014-05-16T12:17:56Z 2014-05-16T12:18:14Z undef strlcpy in case it is implemented as a macro sin sin@2f30.org commit 230e1118843ba0d3acc70c7746a5a22026b25769 parent 9a11e12b5a417ebffe5df793df01c30b8f650862 Author: sin <sin@2f30.org> Date: Fri, 16 May 2014 13:17:56 +0100 undef strlcpy in case it is implemented as a macro some more stylistic changes to util.h 9a11e12b5a417ebffe5df793df01c30b8f650862 2014-04-11T22:50:09Z 2014-04-11T22:50:09Z Bump up to v0.2 sin sin@2f30.org commit 9a11e12b5a417ebffe5df793df01c30b8f650862 parent 552a1f0a630fc6a4792937ded45321b1a757c460 Author: sin <sin@2f30.org> Date: Fri, 11 Apr 2014 23:50:09 +0100 Bump up to v0.2 552a1f0a630fc6a4792937ded45321b1a757c460 2014-04-07T15:44:09Z 2014-04-07T15:44:09Z config: update rules for uevent logic Hiltjo Posthuma hiltjo@codemadness.org commit 552a1f0a630fc6a4792937ded45321b1a757c460 parent df403c19cc5f4c61dcd10dbc4530051755b56172 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 7 Apr 2014 17:44:09 +0200 config: update rules for uevent logic Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org> df403c19cc5f4c61dcd10dbc4530051755b56172 2014-04-07T15:36:56Z 2014-04-07T15:36:56Z smdev: use basename of device for making a path Hiltjo Posthuma hiltjo@codemadness.org commit df403c19cc5f4c61dcd10dbc4530051755b56172 parent 23f3fb721b6ad37fff484ffd859596c7f9c77c5b Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 7 Apr 2014 17:36:56 +0200 smdev: use basename of device for making a path in parsepath() use basename of device (basedevname) to avoid paths like /dev/dri/dri/card0 when for a rule "dri/.*", "=dri" Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org> 23f3fb721b6ad37fff484ffd859596c7f9c77c5b 2014-04-07T15:32:12Z 2014-04-07T15:32:12Z smdev: remove $SMDEV, you can use $DEVNAME Hiltjo Posthuma hiltjo@codemadness.org commit 23f3fb721b6ad37fff484ffd859596c7f9c77c5b parent 87a607f4331ce9994047eac5b640a1216de892c5 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 7 Apr 2014 17:32:12 +0200 smdev: remove $SMDEV, you can use $DEVNAME ... and other environment variables from uevent are exposed. Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org> 87a607f4331ce9994047eac5b640a1216de892c5 2014-04-07T15:31:16Z 2014-04-07T15:31:16Z util: readuevent: read uevent file and set environment variables Hiltjo Posthuma hiltjo@codemadness.org commit 87a607f4331ce9994047eac5b640a1216de892c5 parent 3432f0ce1619b8c0a8d81d87570c5873e3ef01b3 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 7 Apr 2014 17:31:16 +0200 util: readuevent: read uevent file and set environment variables remove devtomajmin() Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org> 3432f0ce1619b8c0a8d81d87570c5873e3ef01b3 2014-04-07T11:27:50Z 2014-04-07T15:26:55Z smdev: doevent, on unknown action return 0 directly Hiltjo Posthuma hiltjo@codemadness.org commit 3432f0ce1619b8c0a8d81d87570c5873e3ef01b3 parent 747489d696c8992f06f279eda75dcda961af1869 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 7 Apr 2014 13:27:50 +0200 smdev: doevent, on unknown action return 0 directly Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org> 747489d696c8992f06f279eda75dcda961af1869 2014-04-07T15:26:30Z 2014-04-07T15:26:30Z config: use tabs Hiltjo Posthuma hiltjo@codemadness.org commit 747489d696c8992f06f279eda75dcda961af1869 parent 7550047abc4f7db1da453ae8927866b512f95a03 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 7 Apr 2014 17:26:30 +0200 config: use tabs Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org> 7550047abc4f7db1da453ae8927866b512f95a03 2014-04-06T13:59:39Z 2014-04-07T15:25:40Z smdev SMDEV environment fix and small optimization Hiltjo Posthuma hiltjo@codemadness.org commit 7550047abc4f7db1da453ae8927866b512f95a03 parent ddacaa6b20569d4fb4be3de615434f5f59fe9b28 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 6 Apr 2014 15:59:39 +0200 smdev SMDEV environment fix and small optimization Use setenv() with overwrite flag to set environment variable. This fixes an issue where SMDEV was still set to a previous rule environment (symlinked my /dev/cdrom to usb2 :)). Optimization: check if rule->cmd is set, else don't change directory to /dev and don't set the environment variable. Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org> ddacaa6b20569d4fb4be3de615434f5f59fe9b28 2014-04-06T13:56:02Z 2014-04-07T15:25:34Z config: match /dev/rtc and /dev/rtc[0-9] Hiltjo Posthuma hiltjo@codemadness.org commit ddacaa6b20569d4fb4be3de615434f5f59fe9b28 parent 02fabc3dfd5b38ffe326030c6bbb537ec61b31ea Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 6 Apr 2014 15:56:02 +0200 config: match /dev/rtc and /dev/rtc[0-9] Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org> 02fabc3dfd5b38ffe326030c6bbb537ec61b31ea 2014-04-06T08:04:43Z 2014-04-06T08:04:43Z Don't assume that the path we are installing to exists sin sin@2f30.org commit 02fabc3dfd5b38ffe326030c6bbb537ec61b31ea parent 7fdb83148bc7ad9b70434a7e3af5de68c4579514 Author: sin <sin@2f30.org> Date: Sun, 6 Apr 2014 09:04:43 +0100 Don't assume that the path we are installing to exists 7fdb83148bc7ad9b70434a7e3af5de68c4579514 2014-02-17T14:28:12Z 2014-02-17T14:40:51Z Add more devices to config.def.h sin sin@2f30.org commit 7fdb83148bc7ad9b70434a7e3af5de68c4579514 parent 2855c54be92346f2b2f5816ca6cc2953fbb3c975 Author: sin <sin@2f30.org> Date: Mon, 17 Feb 2014 14:28:12 +0000 Add more devices to config.def.h 2855c54be92346f2b2f5816ca6cc2953fbb3c975 2014-02-17T14:12:39Z 2014-02-17T14:12:39Z Handle /dev/input/* devices correctly sin sin@2f30.org commit 2855c54be92346f2b2f5816ca6cc2953fbb3c975 parent fcda082f0f67489b07a9f9d2b5fa0bc843ae9919 Author: sin <sin@2f30.org> Date: Mon, 17 Feb 2014 14:12:39 +0000 Handle /dev/input/* devices correctly fcda082f0f67489b07a9f9d2b5fa0bc843ae9919 2014-02-14T10:47:52Z 2014-02-14T10:47:52Z Bump up to v0.1 sin sin@2f30.org commit fcda082f0f67489b07a9f9d2b5fa0bc843ae9919 parent 920c9b0caca0a9c372760b1bda223db3279068d8 Author: sin <sin@2f30.org> Date: Fri, 14 Feb 2014 10:47:52 +0000 Bump up to v0.1 920c9b0caca0a9c372760b1bda223db3279068d8 2014-02-14T10:46:40Z 2014-02-14T10:47:07Z Use config.def.h instead of config.h sin sin@2f30.org commit 920c9b0caca0a9c372760b1bda223db3279068d8 parent 18be0760ce0ff089f6bfe802b81ef7fd8f6c7cd0 Author: sin <sin@2f30.org> Date: Fri, 14 Feb 2014 10:46:40 +0000 Use config.def.h instead of config.h 18be0760ce0ff089f6bfe802b81ef7fd8f6c7cd0 2013-09-05T13:28:15Z 2013-09-05T13:28:15Z Ignore errors for symlink() sin sin@2f30.org commit 18be0760ce0ff089f6bfe802b81ef7fd8f6c7cd0 parent 08dd361bc017b26f9f1126210da7243e3401f98a Author: sin <sin@2f30.org> Date: Thu, 5 Sep 2013 14:28:15 +0100 Ignore errors for symlink() 08dd361bc017b26f9f1126210da7243e3401f98a 2013-09-05T10:26:49Z 2013-09-05T10:54:14Z Install to bin and not sbin sin sin@2f30.org commit 08dd361bc017b26f9f1126210da7243e3401f98a parent 0b6fda11f98333f968a2e159b67a2d8c953a96a6 Author: sin <sin@2f30.org> Date: Thu, 5 Sep 2013 11:26:49 +0100 Install to bin and not sbin 0b6fda11f98333f968a2e159b67a2d8c953a96a6 2013-09-02T09:55:54Z 2013-09-02T09:55:54Z Rename `off' to `pmatch' sin sin@2f30.org commit 0b6fda11f98333f968a2e159b67a2d8c953a96a6 parent 0c13b2cf9547db0e94825c1343a98eaea5e7b13a Author: sin <sin@2f30.org> Date: Mon, 2 Sep 2013 10:55:54 +0100 Rename `off' to `pmatch' 0c13b2cf9547db0e94825c1343a98eaea5e7b13a 2013-09-02T09:38:23Z 2013-09-02T09:38:54Z Constify struct rule in config.h sin sin@2f30.org commit 0c13b2cf9547db0e94825c1343a98eaea5e7b13a parent 9ef2984829ef5c3655296ceed54d270fbff660cc Author: sin <sin@2f30.org> Date: Mon, 2 Sep 2013 10:38:23 +0100 Constify struct rule in config.h 9ef2984829ef5c3655296ceed54d270fbff660cc 2013-09-02T09:27:08Z 2013-09-02T09:27:08Z If path[0] is ! then run the command hook for the rule sin sin@2f30.org commit 9ef2984829ef5c3655296ceed54d270fbff660cc parent 4493e6f0efa782693f55b062e02d246a257efddf Author: sin <sin@2f30.org> Date: Mon, 2 Sep 2013 10:27:08 +0100 If path[0] is ! then run the command hook for the rule 4493e6f0efa782693f55b062e02d246a257efddf 2013-09-02T09:21:50Z 2013-09-02T09:22:55Z $SMDEV points to device name sin sin@2f30.org commit 4493e6f0efa782693f55b062e02d246a257efddf parent 6599c9ea656da6b55aa06257c656ed85362964d7 Author: sin <sin@2f30.org> Date: Mon, 2 Sep 2013 10:21:50 +0100 $SMDEV points to device name Export $SMDEV for removedev() as well 6599c9ea656da6b55aa06257c656ed85362964d7 2013-08-30T10:19:26Z 2013-08-30T10:20:18Z Do not try to remove a node if path[0] is ! sin sin@2f30.org commit 6599c9ea656da6b55aa06257c656ed85362964d7 parent 063cb06ee9026267aa021b71360d2932c4f009bc Author: sin <sin@2f30.org> Date: Fri, 30 Aug 2013 11:19:26 +0100 Do not try to remove a node if path[0] is ! I think mdev actually runs the command hook for the rule even if path[0] is ! - we should look into that and fix it in the future. 063cb06ee9026267aa021b71360d2932c4f009bc 2013-08-30T10:11:15Z 2013-08-30T10:11:15Z Until we chdir() to /dev use absolute paths sin sin@2f30.org commit 063cb06ee9026267aa021b71360d2932c4f009bc parent a7b24e8391c23cdaf3ab7e73d48b8410f6fe536f Author: sin <sin@2f30.org> Date: Fri, 30 Aug 2013 11:11:15 +0100 Until we chdir() to /dev use absolute paths a7b24e8391c23cdaf3ab7e73d48b8410f6fe536f 2013-08-29T19:08:40Z 2013-08-29T19:08:40Z Prevent creation of device nodes with ! sin sin@2f30.org commit a7b24e8391c23cdaf3ab7e73d48b8410f6fe536f parent 4e4ade53058e03ca944b5cafbbbe7384eecfea02 Author: sin <sin@2f30.org> Date: Thu, 29 Aug 2013 20:08:40 +0100 Prevent creation of device nodes with ! 4e4ade53058e03ca944b5cafbbbe7384eecfea02 2013-08-27T14:46:45Z 2013-08-28T09:21:54Z Introduce struct rulepath sin sin@2f30.org commit 4e4ade53058e03ca944b5cafbbbe7384eecfea02 parent dc0149bbdeb0eebac1636c4afa16906ef76d06b3 Author: sin <sin@2f30.org> Date: Tue, 27 Aug 2013 15:46:45 +0100 Introduce struct rulepath dc0149bbdeb0eebac1636c4afa16906ef76d06b3 2013-08-27T11:51:42Z 2013-08-27T11:51:42Z Fix simevent sin sin@2f30.org commit dc0149bbdeb0eebac1636c4afa16906ef76d06b3 parent cdfaba6355fa24376847d11cd71e4c2ade92869e Author: sin <sin@2f30.org> Date: Tue, 27 Aug 2013 12:51:42 +0100 Fix simevent cdfaba6355fa24376847d11cd71e4c2ade92869e 2013-08-27T09:37:26Z 2013-08-27T09:37:26Z Add comment for parsepath() sin sin@2f30.org commit cdfaba6355fa24376847d11cd71e4c2ade92869e parent bc96a14903c0b001120ddc939ab19302248eb2a0 Author: sin <sin@2f30.org> Date: Tue, 27 Aug 2013 10:37:26 +0100 Add comment for parsepath() bc96a14903c0b001120ddc939ab19302248eb2a0 2013-08-27T09:35:48Z 2013-08-27T09:36:00Z No need to store strchr() return value to a local var sin sin@2f30.org commit bc96a14903c0b001120ddc939ab19302248eb2a0 parent 9f581446fd2c776f23adad603102a5363ff0c5a6 Author: sin <sin@2f30.org> Date: Tue, 27 Aug 2013 10:35:48 +0100 No need to store strchr() return value to a local var 9f581446fd2c776f23adad603102a5363ff0c5a6 2013-08-27T08:59:49Z 2013-08-27T08:59:49Z Fix indentation for strlcpy() sin sin@2f30.org commit 9f581446fd2c776f23adad603102a5363ff0c5a6 parent 8c09bbb4f22f1a3616eb7518fc17b726bd422372 Author: sin <sin@2f30.org> Date: Tue, 27 Aug 2013 09:59:49 +0100 Fix indentation for strlcpy() 8c09bbb4f22f1a3616eb7518fc17b726bd422372 2013-08-27T08:47:09Z 2013-08-27T08:48:10Z Add comment to remember to fix the semantics for $SMDEV sin sin@2f30.org commit 8c09bbb4f22f1a3616eb7518fc17b726bd422372 parent fdc8d9bc59f0a945fe28932bdfbe73c4aa772362 Author: sin <sin@2f30.org> Date: Tue, 27 Aug 2013 09:47:09 +0100 Add comment to remember to fix the semantics for $SMDEV fdc8d9bc59f0a945fe28932bdfbe73c4aa772362 2013-08-23T16:52:11Z 2013-08-23T18:57:52Z Add comment for ev->devname sin sin@2f30.org commit fdc8d9bc59f0a945fe28932bdfbe73c4aa772362 parent c228339545934e7ddf3f25ad262348488a36c01c Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 17:52:11 +0100 Add comment for ev->devname c228339545934e7ddf3f25ad262348488a36c01c 2013-08-23T13:54:21Z 2013-08-23T13:54:21Z Use path for &rule->path[1] sin sin@2f30.org commit c228339545934e7ddf3f25ad262348488a36c01c parent 8ded4053dbc591e4027f0e57b132fdead3ed35b5 Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 14:54:21 +0100 Use path for &rule->path[1] 8ded4053dbc591e4027f0e57b132fdead3ed35b5 2013-08-23T13:49:54Z 2013-08-23T13:49:54Z Don't strdup() for basename() sin sin@2f30.org commit 8ded4053dbc591e4027f0e57b132fdead3ed35b5 parent 817b53cfcef7d802db253132cb8bcee3accb56bb Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 14:49:54 +0100 Don't strdup() for basename() 817b53cfcef7d802db253132cb8bcee3accb56bb 2013-08-23T13:47:05Z 2013-08-23T13:47:14Z Fix parsepath() to include devnamesz sin sin@2f30.org commit 817b53cfcef7d802db253132cb8bcee3accb56bb parent 3f864d112ba7ab71fc76e8141a901c7c51190aa0 Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 14:47:05 +0100 Fix parsepath() to include devnamesz 3f864d112ba7ab71fc76e8141a901c7c51190aa0 2013-08-23T12:43:47Z 2013-08-23T13:39:10Z Fix naming + style sin sin@2f30.org commit 3f864d112ba7ab71fc76e8141a901c7c51190aa0 parent 489d08c79725cad5203a1d52ede57851b6d78ba0 Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 13:43:47 +0100 Fix naming + style 489d08c79725cad5203a1d52ede57851b6d78ba0 2013-08-23T12:25:16Z 2013-08-23T12:25:16Z Support remove action sin sin@2f30.org commit 489d08c79725cad5203a1d52ede57851b6d78ba0 parent 5f48a52f383ac2a646b4608195372a314a91e7e5 Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 13:25:16 +0100 Support remove action 5f48a52f383ac2a646b4608195372a314a91e7e5 2013-08-23T11:24:22Z 2013-08-23T11:39:16Z Add some comments and clean up the code a bit sin sin@2f30.org commit 5f48a52f383ac2a646b4608195372a314a91e7e5 parent dd397daae5b0314ad124195a67d02f0bf5cad009 Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 12:24:22 +0100 Add some comments and clean up the code a bit dd397daae5b0314ad124195a67d02f0bf5cad009 2013-08-23T10:40:57Z 2013-08-23T10:40:57Z Refactor rule/event/path handling sin sin@2f30.org commit dd397daae5b0314ad124195a67d02f0bf5cad009 parent 4edeed89d479ba3a582913a577fbe315d53464fc Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 11:40:57 +0100 Refactor rule/event/path handling 4edeed89d479ba3a582913a577fbe315d53464fc 2013-08-23T09:33:16Z 2013-08-23T10:01:51Z Factor out path parsing sin sin@2f30.org commit 4edeed89d479ba3a582913a577fbe315d53464fc parent 47d91161ece9e1c8e2dbc976c4903871858437e1 Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 10:33:16 +0100 Factor out path parsing 47d91161ece9e1c8e2dbc976c4903871858437e1 2013-08-23T09:28:35Z 2013-08-23T10:01:47Z Ensure runcmd handling is done based on the current event sin sin@2f30.org commit 47d91161ece9e1c8e2dbc976c4903871858437e1 parent 306560e3dbc8602dfbd44bc5c4abdd650fc4fdaa Author: sin <sin@2f30.org> Date: Fri, 23 Aug 2013 10:28:35 +0100 Ensure runcmd handling is done based on the current event 306560e3dbc8602dfbd44bc5c4abdd650fc4fdaa 2013-08-22T17:56:36Z 2013-08-22T20:00:55Z Explicitly check for REG_NOMATCH sin sin@2f30.org commit 306560e3dbc8602dfbd44bc5c4abdd650fc4fdaa parent 9ad57d03f120e0d6f9751bb8105cbd2da19c5bd0 Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 18:56:36 +0100 Explicitly check for REG_NOMATCH 9ad57d03f120e0d6f9751bb8105cbd2da19c5bd0 2013-08-22T17:31:56Z 2013-08-22T17:31:56Z Cache preg entries sin sin@2f30.org commit 9ad57d03f120e0d6f9751bb8105cbd2da19c5bd0 parent 15e7c7796a6d6b8d9739e8215d8b3ab8b8ce5ee1 Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 18:31:56 +0100 Cache preg entries 15e7c7796a6d6b8d9739e8215d8b3ab8b8ce5ee1 2013-08-22T16:30:29Z 2013-08-22T16:30:29Z Move up to C99 sin sin@2f30.org commit 15e7c7796a6d6b8d9739e8215d8b3ab8b8ce5ee1 parent 6ba112096e874651ad6fcc960fa608c501aaab2d Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 17:30:29 +0100 Move up to C99 6ba112096e874651ad6fcc960fa608c501aaab2d 2013-08-22T15:58:47Z 2013-08-22T15:58:47Z Add simevent sin sin@2f30.org commit 6ba112096e874651ad6fcc960fa608c501aaab2d parent a6903cbf34a395db271573304ab3c5cf931c96f1 Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 16:58:47 +0100 Add simevent a6903cbf34a395db271573304ab3c5cf931c96f1 2013-08-22T15:52:37Z 2013-08-22T15:52:37Z Add -pedantic to CFLAGS sin sin@2f30.org commit a6903cbf34a395db271573304ab3c5cf931c96f1 parent 017fb368d24eec3c48fe193e9b14698cddcc2539 Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 16:52:37 +0100 Add -pedantic to CFLAGS 017fb368d24eec3c48fe193e9b14698cddcc2539 2013-08-22T15:48:48Z 2013-08-22T15:49:21Z Re-arrange includes sin sin@2f30.org commit 017fb368d24eec3c48fe193e9b14698cddcc2539 parent 8c66cfaf736340ff2c7d984bc4d7b2b92640af6d Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 16:48:48 +0100 Re-arrange includes 8c66cfaf736340ff2c7d984bc4d7b2b92640af6d 2013-08-22T13:22:13Z 2013-08-22T13:22:13Z Rename runcmd() to runrule() sin sin@2f30.org commit 8c66cfaf736340ff2c7d984bc4d7b2b92640af6d parent 210bd07cd4bb0c41313fda721578a3ddbbd52493 Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 14:22:13 +0100 Rename runcmd() to runrule() 210bd07cd4bb0c41313fda721578a3ddbbd52493 2013-08-22T13:06:42Z 2013-08-22T13:10:18Z Fix path parsing sin sin@2f30.org commit 210bd07cd4bb0c41313fda721578a3ddbbd52493 parent 0534a1001fb7990c2837bc4cf76f7f4824a890c1 Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 14:06:42 +0100 Fix path parsing 0534a1001fb7990c2837bc4cf76f7f4824a890c1 2013-08-22T12:31:08Z 2013-08-22T12:31:36Z Print an error if the environment is not set up for hotplugging sin sin@2f30.org commit 0534a1001fb7990c2837bc4cf76f7f4824a890c1 parent 58018dfb567aa80dc11bd81446fce1764ad628aa Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 13:31:08 +0100 Print an error if the environment is not set up for hotplugging 58018dfb567aa80dc11bd81446fce1764ad628aa 2013-08-22T12:20:30Z 2013-08-22T12:25:56Z Factor out cmd execution to runcmd() sin sin@2f30.org commit 58018dfb567aa80dc11bd81446fce1764ad628aa parent cf0ac2f526b5e82d94a1cd02428ebd8bfb5cb00b Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 13:20:30 +0100 Factor out cmd execution to runcmd() cf0ac2f526b5e82d94a1cd02428ebd8bfb5cb00b 2013-08-22T09:45:24Z 2013-08-22T11:21:37Z Introduce struct Event and add primitive hotplugging support sin sin@2f30.org commit cf0ac2f526b5e82d94a1cd02428ebd8bfb5cb00b parent 18552e102e3d739d8c03379716b8acbc9ddbc8f7 Author: sin <sin@2f30.org> Date: Thu, 22 Aug 2013 10:45:24 +0100 Introduce struct Event and add primitive hotplugging support This unifies the way we handle hotplug events versus static population of the /dev directory. We also remove the assumption for createdev() to only work correctly if the current directory is set to the corresponding sysfs entry. 18552e102e3d739d8c03379716b8acbc9ddbc8f7 2013-08-21T17:11:15Z 2013-08-21T17:11:15Z Change default permissions from 0777 to 0660 sin sin@2f30.org commit 18552e102e3d739d8c03379716b8acbc9ddbc8f7 parent 13d80055a7d58231c3ad43be51b383fa222d2f3c Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 18:11:15 +0100 Change default permissions from 0777 to 0660 13d80055a7d58231c3ad43be51b383fa222d2f3c 2013-08-21T16:31:26Z 2013-08-21T17:06:07Z Execute hook on *cmd as well sin sin@2f30.org commit 13d80055a7d58231c3ad43be51b383fa222d2f3c parent 8243d1a683e336ff6edb1ea1b65cde089a6322cb Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 17:31:26 +0100 Execute hook on *cmd as well 8243d1a683e336ff6edb1ea1b65cde089a6322cb 2013-08-21T16:00:21Z 2013-08-21T16:00:21Z Fix comments sin sin@2f30.org commit 8243d1a683e336ff6edb1ea1b65cde089a6322cb parent 74d551415ca2b21d5b7d657b89466975c8f492a4 Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 17:00:21 +0100 Fix comments 74d551415ca2b21d5b7d657b89466975c8f492a4 2013-08-21T15:44:20Z 2013-08-21T15:48:51Z Error out if the path or cmd is invalid sin sin@2f30.org commit 74d551415ca2b21d5b7d657b89466975c8f492a4 parent 77c9b9042ba0f9f0c2fff715dbac21535bcea202 Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 16:44:20 +0100 Error out if the path or cmd is invalid 77c9b9042ba0f9f0c2fff715dbac21535bcea202 2013-08-21T14:46:59Z 2013-08-21T14:47:11Z Clean up path parsing sin sin@2f30.org commit 77c9b9042ba0f9f0c2fff715dbac21535bcea202 parent 265d727f2d1caa61e8336b3a36f9e176aa57f5d6 Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 15:46:59 +0100 Clean up path parsing 265d727f2d1caa61e8336b3a36f9e176aa57f5d6 2013-08-21T10:20:20Z 2013-08-21T10:20:20Z Call mkpath() with a 022 umask, then restore it to 0 sin sin@2f30.org commit 265d727f2d1caa61e8336b3a36f9e176aa57f5d6 parent 5ce5c84744b108344c59ac30c77ef6a0d2dcde76 Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 11:20:20 +0100 Call mkpath() with a 022 umask, then restore it to 0 5ce5c84744b108344c59ac30c77ef6a0d2dcde76 2013-08-21T10:19:21Z 2013-08-21T10:19:21Z Add some comments sin sin@2f30.org commit 5ce5c84744b108344c59ac30c77ef6a0d2dcde76 parent d7f305ee12680d8f218e73e6e3d5d77b74b319d6 Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 11:19:21 +0100 Add some comments d7f305ee12680d8f218e73e6e3d5d77b74b319d6 2013-08-21T09:39:05Z 2013-08-21T10:17:54Z Support @cmd sin sin@2f30.org commit d7f305ee12680d8f218e73e6e3d5d77b74b319d6 parent b879ac0c88c4d0bed94a3590c4574848b8206b7d Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 10:39:05 +0100 Support @cmd b879ac0c88c4d0bed94a3590c4574848b8206b7d 2013-08-21T09:12:25Z 2013-08-21T09:29:22Z Factor out regex matching and re-arrange rule parsing sin sin@2f30.org commit b879ac0c88c4d0bed94a3590c4574848b8206b7d parent faf4f4295234ab591507c2782b40efbffb74b5c0 Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 10:12:25 +0100 Factor out regex matching and re-arrange rule parsing faf4f4295234ab591507c2782b40efbffb74b5c0 2013-08-21T08:29:53Z 2013-08-21T08:57:51Z Add mkpath() - a recursive mkdir() implementation sin sin@2f30.org commit faf4f4295234ab591507c2782b40efbffb74b5c0 parent 09854b708feef2a61cb9b56197c03d4b4a1e55fc Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 09:29:53 +0100 Add mkpath() - a recursive mkdir() implementation The code was taken from ii[1]. [1] http://git.suckless.org/ii 09854b708feef2a61cb9b56197c03d4b4a1e55fc 2013-08-21T08:13:25Z 2013-08-21T08:14:17Z Set umask to 0 sin sin@2f30.org commit 09854b708feef2a61cb9b56197c03d4b4a1e55fc parent 4953771833f88278c3109e0b40d5746f9004fc9b Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 09:13:25 +0100 Set umask to 0 4953771833f88278c3109e0b40d5746f9004fc9b 2013-08-21T08:13:20Z 2013-08-21T08:14:08Z Factor out devtomajmin() and devtype() sin sin@2f30.org commit 4953771833f88278c3109e0b40d5746f9004fc9b parent 733f60dba2b8c878945b856c23a6bc44de52fc11 Author: sin <sin@2f30.org> Date: Wed, 21 Aug 2013 09:13:20 +0100 Factor out devtomajmin() and devtype() 733f60dba2b8c878945b856c23a6bc44de52fc11 2013-08-20T12:26:10Z 2013-08-20T17:07:00Z Initial commit sin sin@2f30.org commit 733f60dba2b8c878945b856c23a6bc44de52fc11 Author: sin <sin@2f30.org> Date: Tue, 20 Aug 2013 13:26:10 +0100 Initial commit