Commit Graph

102 Commits

Author SHA1 Message Date
christos 5a9c754ab2 Make makedir code optional for all directories (fd and altq) are affected.
This is so that md code that tries to call makedev altq or fd does not fail
when the file exists. This was reported in port-powerpc, when building /dev.
2008-03-05 02:29:51 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
riz ed16d9b321 Create drvctl as part of 'all'. 2007-12-17 04:29:50 +00:00
apb f90ed3540d s/07555/0755/ in permissions of /dev file system. Thanks to
Dieter Roelants for the report.
2007-12-16 16:09:27 +00:00
apb 802860abdb When MAKEDEV creates a memory file system, let it try mount_tmpfs(8)
before falling back to mount_mfs(8).  Also calculate required number
of inodes more accurately.

Discussed in tech-userlevel.
2007-12-15 21:33:13 +00:00
apb beae89cd6d In MAKEDEV.tmpl:
* Add a nooutput function to be used instead of redirecting to /dev/null,
  because /dev/null might not exist early in the boot sequence.  This
  should fix a bug in which the pax autodetection failed when used from
  init(8) with a read-only root file system without a /dev/null.
* Move most of the main program into a new makedev_main function,
  to allow reuse by MAKEDEV.local.

In MAKEDEV.local:
* Use the new makedev_main function defined in MAKEDEV.  This allows
  MAKEDEV.local to support all the options understood by MAKEDEV, instead
  of only a subset.  This should fix a bug in which the setup() function
  could try to use pax mode even though that was previously not supported.

In MAKEDEV.local man page:
* Update list of command line options.
* Don't explain all the options, just refer to MAKEDEV(8) man page.
* Remove BUGS section now that all MAKEDEV options are supported
  by MAKEDEV.local.
2007-12-15 17:28:09 +00:00
apb 280f9669d3 * Move duplicated code into a check_pax function, and improve the test
for whether pax is likely to be usable.
* Don't try to create an mfs with fewer than 10 inodes.
* Add a missing exit in an error case.
2007-12-11 11:51:19 +00:00
apb c1da1584c4 Pass "-pe" flag to pax, otherwise the devices get created with
permissions modified by the umask.
2007-12-11 10:02:24 +00:00
apb 6d3d3ebe02 * MAKEDEV's "-M -M" option was always intended for use only by init(8).
Improve the documentation around that.
* The "-p pax", "-m mknod", and "-s" (mtree specfile) options should
  always have been mutually exclusive.  Now enforce that.
* The "-f" option didn't ever work with pax or mtree mode; document that,
  and make it an error to try something that won't work.
* Make pax mode the default, if no other options prevent this, and if
  "pax -w -M" appears to be usable.
* Add missing options to a usage message.
2007-12-09 08:46:16 +00:00
apb 5e14203889 Update some comments and remove an unnecessary eval. No functional change. 2007-12-08 17:52:34 +00:00
apb 3bc3600ea3 Add a linecount shell function, and use it to count the lines in the
output from MAKEDEV.local.

Fixes PR 37498 from dlagner at rambler.ru, using an idea from David
Laight.  The while loop in the old code is executed in a subshell, so it
can't make persistent modifications to the parent shell's variables.
2007-12-08 17:31:12 +00:00
pooka b305014b90 add /dev/pud 2007-11-20 18:58:46 +00:00
pooka 005e676a62 Create /dev/putter and symlink /dev/puffs to it. 2007-11-13 13:14:25 +00:00
jmcneill a5bfefb1b0 Add support for /dev/padN devices 2007-11-11 17:54:47 +00:00
gdt 0930138fa6 Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".
2007-11-03 19:33:36 +00:00
ad 18af8ee9bd Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.
2007-08-04 11:02:56 +00:00
martti 94f749229e Create /dev/bio 2007-05-16 13:06:03 +00:00
dyoung aa85121e03 Make './MAKEDEV local' work as expected, whether we are counting
the number of /dev nodes or not.
2007-03-21 23:07:00 +00:00
dyoung 46abb5c0e8 Remove whitespace from ends of lines. 2007-03-21 03:39:41 +00:00
apb 1f33f6e66f Test whether pax works; if not, fall back to mknod.
This is intended for use on install media that might not have pax.
2007-03-11 16:08:11 +00:00
apb f5b5e05c27 * Add "-p pax" flag, to create all device nodes at once using pax,
instead of one by one using mknod.  This is much faster (speed
  increases of up to 20 times have been observed, but 3 to 5 times is
  more common).
* One "-M" flag will create the mfs file system but not redirect output
  to a temporary console; "-M -M" will also redirect output.
* Change the way we accumulate options to pass to MAKEDEV.local.
2007-03-11 15:52:30 +00:00
dsl b1c0dd5ffc Replace hexprint with a version that is much faster for values > 15.
Since I managed to commit my alternate scheme for zeropad, delete
the commented out lines and replace the only other use.
I've not deleted the function itself though.
2007-03-09 19:16:47 +00:00
dsl 5c2f2286e3 Add a globally applied substitution pattern for the console major number.
Use it when creating a temporary node for the console.
MAKEDEV -M should now output what it is doing.
2007-03-09 13:57:54 +00:00
apb 68723a5b5f Remove MAKEDEV.subr. This removes the risk of third party scripts (or
human procedures) breaking because they assume it's enough to copy
MAKEDEV fom one place to another.

Let MAKEDEV return after defining shell functions but before doing any
real work, if MAKEDEV_AS_LIBRARY is set.

Let MAKEDEV.local load MAKEDEV as a function library via
"MAKEDEV_AS_LIBRARY=1 . MAKEDEV".
2007-03-03 06:36:00 +00:00
dsl 7bb36ad737 Use the correct major number for the temporary console node 2007-03-02 22:44:16 +00:00
dsl 5c38fc826c Add code that can be used by init(1) to request MAKEDEV create a mfs
filesystem and then populate it.
Determine the actual number of inodes that will be needed and add 10%.
Use "mount_mfs -o union" to save us having to copy MADEDEV (in case
anyone wishes to see it.
2007-03-02 21:29:23 +00:00
apb f21f1a9ef9 If we are called as 'sh MAKEDEV ...', then we would previously have
tried to do '. MAKEDEV.subr'.  That doesn't work, we need to do
'. ./MAKEDEV.subr' in that case.
2007-03-01 20:48:26 +00:00
apb 2b64520a8c Avoid using dirname(1), which is not available in installation
ramdisk images.
2007-02-28 19:45:37 +00:00
apb 142606111b Provide a new MAKEDEV.subr file containing utility functions for
use by both MAKEDEV and MAKEDEV.local.  This allows MAKEDEV.local
to accept the same command line arguments as MAKEDEV.

The installed MAKEDEV.subr is generated from MAKEDEV.subr.tmpl.

Replace the licence on MAKEDEV.local with a NetBSD licence, since I
rewrote the entire file.

Reviewed by christos and agc
2007-02-26 20:44:03 +00:00
riz 3ba975dea2 Fix off-by-one error in the creation of dk(4) device nodes. 2007-02-07 03:01:13 +00:00
dyoung df51b53ccc Create /dev/cmos. 2007-02-06 21:27:43 +00:00
hubertf 6a5bb11672 Fix MAKEDEV on shark: Move ses(4) devices from MI code (MAKEDEV.tmpl) to
those platforms that actually have the driver.

See also:
http://mail-index.netbsd.org/tech-userlevel/2007/01/08/0001.html

Fixes PR 26511 properly.

OK'd by wrstuden@
2007-01-15 23:35:11 +00:00
pooka e56cecb8ea create /dev/puffs in 'all' 2007-01-09 15:34:15 +00:00
ad 7334cf17bb Enable /dev/io for COMPAT_FREEBSD. 2006-12-29 19:16:30 +00:00
dyoung 5eaf8c7227 Forward options -f, -m, -s to the MAKEDEV.local script, with the
help of some Bourne-shell magic from David Laight.
2006-12-10 08:14:32 +00:00
pooka c1b5a38fea add puffs device, but I didn't add it to MAKEDEV all on purpose
just quite yet, too experimental
2006-10-22 23:02:08 +00:00
manu 62e38c2a6a Restore twa as major 187, this time with the flag so that it does not get
used in kernels that do not include the driver.
2006-09-24 08:23:36 +00:00
manu 2a6884acfb Back out the twa device:
- if allocated in the MI range, it breaks the builds for ports that do
  not use it
- if allocated in the MD range, 3ware's tw_cli tool will break because it
  hardcodes the major
2006-09-24 03:46:30 +00:00
manu a2d5fc8a9e Add twa device 2006-09-23 22:24:51 +00:00
elad e23e9cfd2a PR/26511: Stephen Borrill: ses devices are not created with MAKEDEV all
Patch applied, thanks!
2006-09-23 20:23:09 +00:00
plunky 4f1cbddc12 update to bluetooth device attachment:
remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf
2006-09-10 15:45:55 +00:00
ad 44f6463cc4 Add /dev/lockstat. 2006-09-07 01:18:01 +00:00
martin 7699ba8851 Typo 2006-08-13 18:53:31 +00:00
christos 415fb2fa98 - add creation of wedges /dev/{r,}dkN
- use $() instead of ``
2006-08-12 19:47:28 +00:00
martti b0c5d0bc0c Create /dev/ipsync, /dev/ipscan and /dev/iplookup (misc/33504). 2006-07-27 06:49:06 +00:00
tron 4241fec1bf Bluetooth fixes by Iain Hibbert:
Change the way in which bluetooth devices attach to system. The
new way is for devices to attach directly to a btdevN device via
its own control file /dev/btdevN.
- bthub(4) is replaced by btdev(4).
- /dev/bthubctl is replaced by /dev/btdevN.
- configuration now uses proplib(3) property lists.
- btcontrol(8) updated to use new API, and now uses private
- XML config file /var/db/btdev.xml.
2006-07-26 10:30:59 +00:00
bouyer d252c65e9c Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.
2006-07-23 12:01:25 +00:00
yamt 660afa3bf2 fix xsd_kva. 2006-07-07 17:21:19 +00:00
bouyer 75e3593f2c Add new xen device xsd_kva (for Xen3 dom0 operations) 2006-07-04 21:39:55 +00:00
gdamore a5c89047c0 Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.)  This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
2006-06-19 15:44:33 +00:00