summaryrefslogtreecommitdiffstats
path: root/share/examples
diff options
context:
space:
mode:
Diffstat (limited to 'share/examples')
-rw-r--r--share/examples/diskless/README.TEMPLATING6
-rw-r--r--share/examples/etc/make.conf12
-rw-r--r--share/examples/ppp/ppp.linkdown.sample2
-rw-r--r--share/examples/printing/hpvf4
-rw-r--r--share/examples/scsi_target/scsi_cmds.c14
-rw-r--r--share/examples/scsi_target/scsi_target.c16
6 files changed, 24 insertions, 30 deletions
diff --git a/share/examples/diskless/README.TEMPLATING b/share/examples/diskless/README.TEMPLATING
index 28edcae..48984e0 100644
--- a/share/examples/diskless/README.TEMPLATING
+++ b/share/examples/diskless/README.TEMPLATING
@@ -94,8 +94,8 @@ be useful to set up clients and server for diskless boot.
/usr/ports ( note 5 )
/usr/src ( note 5 )
/usr/local/crack ( note 5 )
- /usr/X11R6/lib/X11/xdm/xdm-errors ( note 6 )
- /usr/X11R6/lib/X11/xdm/xdm-pid ( note 6 )
+ /usr/local/lib/X11/xdm/xdm-errors ( note 6 )
+ /usr/local/lib/X11/xdm/xdm-pid ( note 6 )
/usr/local/etc/ssh_host_key ( note 6 )
/usr/local/etc/ssh_host_key.pub ( note 6 )
/usr/local/etc/ssh_random_seed ( note 6 )
@@ -120,7 +120,7 @@ be useful to set up clients and server for diskless boot.
do not want to template such directories.
note 6: Note that you can solve the problem of xdm and sshd creating
- files in /usr. With xdm, edit /usr/X11R6/lib/xdm/xdm-config
+ files in /usr. With xdm, edit /usr/local/lib/xdm/xdm-config
and change the errorLogFile and pidFile config lines.
With sshd, add 'HostKey' and 'RandomSeed' directives to specify
diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf
index d3cdf3e7..05872ff 100644
--- a/share/examples/etc/make.conf
+++ b/share/examples/etc/make.conf
@@ -91,13 +91,13 @@
#
#COPTFLAGS= -O -pipe
#
-# Compare before install
+# Compare before install.
#INSTALL=install -C
#
-# Mtree will follow symlinks
+# Mtree will follow symlinks.
#MTREE_FOLLOWS_SYMLINKS= -L
#
-# To enable installing ssh(1) with the setuid bit turned on
+# To enable installing ssh(1) with the setuid bit turned on.
#ENABLE_SUID_SSH=
#
# To enable installing newgrp(1) with the setuid bit turned on.
@@ -117,7 +117,7 @@
#
#TRACEROUTE_NO_IPSEC= # do not build traceroute(8) with IPSEC support
#
-# To build sys/modules when building the world (our old way of doing things)
+# To build sys/modules when building the world (our old way of doing things).
#MODULES_WITH_WORLD= # do not build modules when building kernel
#
# The list of modules to build instead of all of them.
@@ -133,7 +133,7 @@
#
#
# Default format for system documentation, depends on your printer.
-# Set this to "ascii" for simple printers or screen
+# Set this to "ascii" for simple printers or screen.
#
#PRINTERDEVICE= ps
#
@@ -199,7 +199,7 @@
#
# Documentation
#
-# The list of languages and encodings to build and install
+# The list of languages and encodings to build and install.
#
#DOC_LANG= en_US.ISO8859-1 ru_RU.KOI8-R
#
diff --git a/share/examples/ppp/ppp.linkdown.sample b/share/examples/ppp/ppp.linkdown.sample
index c7da79e..749dd94 100644
--- a/share/examples/ppp/ppp.linkdown.sample
+++ b/share/examples/ppp/ppp.linkdown.sample
@@ -23,7 +23,7 @@
# ``auplay'' (assuming NAS is installed and configured).
#
MYADDR:
- !bg /usr/X11R6/bin/auplay /etc/ppp/linkdown.au
+ !bg /usr/local/bin/auplay /etc/ppp/linkdown.au
# If you're running ``ppp -auto -nat dynamic-nat-auto'', and are
# assigned a dynamic IP number by the peer, this may be worth while
diff --git a/share/examples/printing/hpvf b/share/examples/printing/hpvf
index 233de80..c900f31 100644
--- a/share/examples/printing/hpvf
+++ b/share/examples/printing/hpvf
@@ -1,10 +1,10 @@
#!/bin/sh
#
+# $FreeBSD$
+#
# hpvf - Convert GIF files into HP/PCL, then print
# Installed in /usr/local/libexec/hpvf
-PATH=/usr/X11R6/bin:$PATH; export PATH
-
giftopnm | ppmtopgm | pgmtopbm | pbmtolj -resolution 300 \
&& exit 0 \
|| exit 2
diff --git a/share/examples/scsi_target/scsi_cmds.c b/share/examples/scsi_target/scsi_cmds.c
index 10295d7..7a95606 100644
--- a/share/examples/scsi_target/scsi_cmds.c
+++ b/share/examples/scsi_target/scsi_cmds.c
@@ -103,8 +103,8 @@ static struct targ_cdb_handlers cdb_handlers[] = {
static struct scsi_inquiry_data inq_data;
static struct initiator_state istates[MAX_INITIATORS];
extern int debug;
-extern uint64_t volume_size;
-extern size_t sector_size;
+extern off_t volume_size;
+extern u_int sector_size;
extern size_t buf_size;
cam_status
@@ -328,7 +328,7 @@ tcmd_inquiry(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio)
bcopy(&inq_data, ctio->data_ptr, sizeof(inq_data));
ctio->dxfer_len = inq_data.additional_length + 4;
ctio->dxfer_len = min(ctio->dxfer_len,
- SCSI_CDB6_LEN(inq->length));
+ scsi_2btoul(inq->length));
ctio->ccb_h.flags |= CAM_DIR_IN | CAM_SEND_STATUS;
ctio->scsi_status = SCSI_STATUS_OK;
}
@@ -609,7 +609,7 @@ start_io(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio, int dir)
if (dir == CAM_DIR_IN) {
if (notaio) {
if (debug)
- warnx("read sync %lud @ block " OFF_FMT,
+ warnx("read sync %lu @ block " OFF_FMT,
(unsigned long)
(ctio->dxfer_len / sector_size),
c_descr->offset / sector_size);
@@ -625,7 +625,7 @@ start_io(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio, int dir)
}
} else {
if (debug)
- warnx("read async %lud @ block " OFF_FMT,
+ warnx("read async %lu @ block " OFF_FMT,
(unsigned long)
(ctio->dxfer_len / sector_size),
c_descr->offset / sector_size);
@@ -725,7 +725,7 @@ tcmd_rdwr_done(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio,
a_descr->targ_req += ctio->dxfer_len;
if (notaio) {
if (debug)
- warnx("write sync %lud @ block "
+ warnx("write sync %lu @ block "
OFF_FMT, (unsigned long)
(ctio->dxfer_len / sector_size),
c_descr->offset / sector_size);
@@ -742,7 +742,7 @@ tcmd_rdwr_done(struct ccb_accept_tio *atio, struct ccb_scsiio *ctio,
tcmd_rdwr_done(atio, ctio, AIO_DONE);
} else {
if (debug)
- warnx("write async %lud @ block "
+ warnx("write async %lu @ block "
OFF_FMT, (unsigned long)
(ctio->dxfer_len / sector_size),
c_descr->offset / sector_size);
diff --git a/share/examples/scsi_target/scsi_target.c b/share/examples/scsi_target/scsi_target.c
index e6ff5c71..6f665af 100644
--- a/share/examples/scsi_target/scsi_target.c
+++ b/share/examples/scsi_target/scsi_target.c
@@ -100,8 +100,8 @@ static void usage(void);
int
main(int argc, char *argv[])
{
- int ch, unit;
- char *file_name, targname[16];
+ int ch;
+ char *file_name;
u_int16_t req_flags, sim_flags;
off_t user_size;
@@ -283,17 +283,11 @@ main(int argc, char *argv[])
warnx("aio support tested ok");
}
- /* Go through all the control devices and find one that isn't busy. */
- unit = 0;
- do {
- snprintf(targname, sizeof(targname), "/dev/targ%d", unit++);
- targ_fd = open(targname, O_RDWR);
- } while (targ_fd < 0 && errno == EBUSY);
-
+ targ_fd = open("/dev/targ", O_RDWR);
if (targ_fd < 0)
- errx(1, "Tried to open %d devices, none available", unit);
+ err(1, "/dev/targ");
else
- warnx("opened %s", targname);
+ warnx("opened /dev/targ");
/* The first three are handled by kevent() later */
signal(SIGHUP, SIG_IGN);
OpenPOWER on IntegriCloud