summaryrefslogtreecommitdiffstats
path: root/sysutils/libretto-config
diff options
context:
space:
mode:
authorflathill <flathill@FreeBSD.org>1998-12-05 05:35:47 +0000
committerflathill <flathill@FreeBSD.org>1998-12-05 05:35:47 +0000
commitca14223743f3fb4911ddba9d9eb8291d4f0007e1 (patch)
treea322223f8efb0d7ce48531ea62386e714cb14684 /sysutils/libretto-config
parent27f8da1dca53d512d4b4fd516fcfb7fa2c921214 (diff)
downloadFreeBSD-ports-ca14223743f3fb4911ddba9d9eb8291d4f0007e1.zip
FreeBSD-ports-ca14223743f3fb4911ddba9d9eb8291d4f0007e1.tar.gz
PR: ports/8934
Submitted by: shige@kuis.kyoto-u.ac.jp Initial Import libretto-config. The utility program to configure the BIOS setting of the mini notebook computer, Toshiba Libretto.
Diffstat (limited to 'sysutils/libretto-config')
-rw-r--r--sysutils/libretto-config/Makefile35
-rw-r--r--sysutils/libretto-config/distinfo1
-rw-r--r--sysutils/libretto-config/files/patch-aa50
-rw-r--r--sysutils/libretto-config/files/patch-ab123
-rw-r--r--sysutils/libretto-config/files/patch-ac48
-rw-r--r--sysutils/libretto-config/files/patch-ad101
-rw-r--r--sysutils/libretto-config/files/patch-ae110
-rw-r--r--sysutils/libretto-config/pkg-comment1
-rw-r--r--sysutils/libretto-config/pkg-descr26
-rw-r--r--sysutils/libretto-config/pkg-plist7
10 files changed, 502 insertions, 0 deletions
diff --git a/sysutils/libretto-config/Makefile b/sysutils/libretto-config/Makefile
new file mode 100644
index 0000000..4a04ca8
--- /dev/null
+++ b/sysutils/libretto-config/Makefile
@@ -0,0 +1,35 @@
+# New ports collection makefile for: libretto-config
+# Version required: 1.0
+# Date created: 19 Nov 1998
+# Whom: Shigeyuki FUKUSHIMA <shige@kuis.kyoto-u.ac.jp>
+#
+# $Id$
+#
+
+DISTNAME= libapm-linux-1.0beta5
+PKGNAME= ${PROGRAM_NAME}-1.0b5
+CATEGORIES= sysutils
+MASTER_SITES= http://club.pep.ne.jp/~ishioka/Software/Linux/libapm/
+
+MAINTAINER= shige@kuis.kyoto-u.ac.jp
+
+WRKSRC= ${WRKDIR}/libapm
+PROGRAM_NAME= libretto-config
+DOCDIR= ${PREFIX}/share/doc/${PROGRAM_NAME}
+
+MAN8= ${PROGRAM_NAME}.8
+MANLANG= . ja
+
+post-install:
+# install japanese manpage also :-)
+ @${INSTALL_MAN} ${WRKSRC}/libapm-j.man ${PREFIX}/man/ja/man8/${PROGRAM_NAME}.8
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCDIR}
+ @${INSTALL_DATA} ${WRKSRC}/README-e.1st ${DOCDIR}/README.1st
+ @${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-e.txt ${DOCDIR}/APM-EXBIOS.txt
+ @${MKDIR} ${DOCDIR}/ja
+ @${INSTALL_DATA} ${WRKSRC}/README-j.1st ${DOCDIR}/ja/README.1st
+ @${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-j.txt ${DOCDIR}/ja/APM-EXBIOS.txt
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/libretto-config/distinfo b/sysutils/libretto-config/distinfo
new file mode 100644
index 0000000..4a3fa55
--- /dev/null
+++ b/sysutils/libretto-config/distinfo
@@ -0,0 +1 @@
+MD5 (libapm-linux-1.0beta5.tar.gz) = 15e69726d2ea8bd1037e6ec0b9a03826
diff --git a/sysutils/libretto-config/files/patch-aa b/sysutils/libretto-config/files/patch-aa
new file mode 100644
index 0000000..087edc0
--- /dev/null
+++ b/sysutils/libretto-config/files/patch-aa
@@ -0,0 +1,50 @@
+--- Makefile.orig Thu Jun 18 19:44:09 1998
++++ Makefile Thu Nov 26 12:36:44 1998
+@@ -1,17 +1,18 @@
+ OBJ = libapm.o bios.o smi.o
+ PROGRAM = libapm
+-OWNER = -g root
+-GROUP = -o root
+-MODE = -m 755
+-#MODE = -m 4755
+-BINDIR = /usr/local/bin
+-MANSECT = l
+-MANDIR = /usr/local/man/ja_JP.ujis
+-MANLANG = j
+-#MANDIR = /usr/local/man
+-#MANLANG = e
++PROGRAM_NAME = libretto-config
++OWNER = -o root
++GROUP = -g operator
++MODE = -m 4550
++BINDIR = /usr/local/sbin
++MANSECT = 8
++MANDIR = /usr/local/man
++MANLANG = e
+
+-CFLAGS = -O2 #-DLIBRETTO -DDEBUG
++#DEFS= -DLIBRETTO -DDEBUG
++CFLAGS = -pipe -O $(DEFS)
++
++all: $(PROGRAM)
+
+ $(PROGRAM): $(OBJ)
+ $(CC) $(CFLAGS) -o $(PROGRAM) $(OBJ)
+@@ -19,12 +20,12 @@
+ clean:
+ /bin/rm -f $(OBJ) $(PROGRAM) *~
+
+-install: install.bin
++install: install.bin install.man
+
+ install.bin:
+- install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(BINDIR)
++ install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(BINDIR)/$(PROGRAM_NAME)
+
+ install.man:
+- - mkdir $(MANDIR)/man$(MANSECT)
+- install -c -m 644 libapm-${MANLANG}.man $(MANDIR)/man$(MANSECT)/libapm.$(MANSECT)
+-
++ ${BSD_INSTALL_MAN} libapm-${MANLANG}.man $(MANDIR)/man$(MANSECT)/$(PROGRAM_NAME).$(MANSECT)
++
++libapm.o: libapm.h libapm.c
diff --git a/sysutils/libretto-config/files/patch-ab b/sysutils/libretto-config/files/patch-ab
new file mode 100644
index 0000000..fc96539
--- /dev/null
+++ b/sysutils/libretto-config/files/patch-ab
@@ -0,0 +1,123 @@
+--- libapm.c.orig Fri Jun 19 09:28:23 1998
++++ libapm.c Thu Nov 26 13:22:19 1998
+@@ -8,12 +8,19 @@
+ /* */
+ /***********************************************************/
+
++#undef HAVE_GETOPT_LONG
++#ifdef __linux__
++#define HAVE_GETOPT_LONG 1
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <string.h>
+ #include <ctype.h>
++#ifdef HAVE_GETOPT_LONG
+ #include <getopt.h>
++#endif
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/mman.h>
+@@ -63,6 +70,7 @@
+ int r;
+ char c;
+
++#ifdef HAVE_GETOPT_LONG
+ struct option longopts[] = {
+ { "Help", 0, 0, 'h' },
+ { "Version", 0, 0, 'v' },
+@@ -78,6 +86,7 @@
+ #endif /* CMOS_ACCESS */
+ {0, 0, 0, 0}
+ };
++#endif
+
+ if( 0 != geteuid() ){
+ printf("%s: Only root can execute !!\n", argv[0]);
+@@ -98,8 +107,12 @@
+
+ get_status();
+
++#ifdef HAVE_GETOPT_LONG
+ while ((c = getopt_long(argc,argv,
+ "hvP:T:a:S:A:L:V:O:", longopts, NULL)) != -1) {
++#else
++ while ((c = getopt(argc,argv, "hvP:T:a:S:A:L:V:O:")) != -1) {
++#endif
+ switch (c) {
+ case 'h':
+ usage();
+@@ -215,8 +228,9 @@
+ void usage(void)
+ {
+ #ifdef CMOS_ACCESS
++# ifdef HAVE_GETOPT_LONG
+ printf("
+-usage: libapm [-v --Version]
++usage: libretto-config [-v --Version]
+ [-h --Help]
+ [-P --PowerUp {boot,hibernation}]
+ [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}]
+@@ -225,9 +239,24 @@
+ [-A --AlarmOn {disable,<time>}]
+ [-L --LcdPower {0,1,2,3}]
+ \n");
+-#else
++# else /* not HAVE_GETOPT_LONG */
++ printf("
++usage: libretto-config [-v : Version]
++ [-h : Help]
++ [-P {boot,hibernation} : PowerUp]
++ [-T {0,5,10,15,30,45,60,unlimit} : StandbyTime]
++ [-a {disable,10,20,30,40,50,60} : AutoOff]
++ [-S {disable,enable} : PanelSwitch]
++ [-A {disable,<time>} : AlarmOn]
++ [-L {0,1,2,3} : LcdPower]
++ \n");
++# endif /* HAVE_GETOPT_LONG */
++
++#else /* not CMOS_ACCESS */
++
++# ifdef HAVE_GETOPT_LONG
+ printf("
+-usage: libapm [-v --Version]
++usage: libretto-config [-v --Version]
+ [-h --Help]
+ [-P --PowerUp {boot,hibernation}]
+ [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}]
+@@ -238,6 +267,21 @@
+ [-V --Volume {0,1,2,3}]
+ [-O --Off {suspend|hibernation} Use Only >= Libretto100]
+ \n");
++# else /* not HAVE_GETOPT_LONG */
++ printf("
++usage: libretto-config [-v : Version]
++ [-h : Help]
++ [-P {boot,hibernation} : PowerUp]
++ [-T {0,5,10,15,30,45,60,unlimit} : StandbyTime]
++ [-a {disable,10,20,30,40,50,60} : AutoOff]
++ [-S {disable,enable} : PanelSwitch]
++ [-A {disable,<time>} : AlarmOn]
++ [-L {0,1,2,3} : LcdPower]
++ [-V {0,1,2,3} : Volume]
++ [-O {suspend|hibernation} : Off (Use Only>=Libretto100)]
++ \n");
++# endif /* HAVE_GETOPT_LONG */
++
+ #endif /* CMOS_ACCESS */
+ exit(1);
+ }
+@@ -246,7 +290,11 @@
+ void init(void)
+ {
+ /* SMI port */
++#ifdef __linux__
+ ioperm(0xb2, 1, 1);
++#else
++ open("/dev/io", O_RDWR, 0);
++#endif
+ }
+ #endif /* CMOS_ACCESS */
+
diff --git a/sysutils/libretto-config/files/patch-ac b/sysutils/libretto-config/files/patch-ac
new file mode 100644
index 0000000..d94a072
--- /dev/null
+++ b/sysutils/libretto-config/files/patch-ac
@@ -0,0 +1,48 @@
+diff -urN libapm.h.orig libapm.h
+--- libapm.h.orig Tue May 12 11:05:49 1998
++++ libapm.h Thu Nov 19 13:02:03 1998
+@@ -32,34 +32,44 @@
+ #define outb(port, value) port_out(value, port)
+ #define outw(port, value) port_outw(value, port)
+
++#ifdef __linux__
+ int io_enable(void)
+ {
+ ioperm(0x70, 1, 1);
+ ioperm(0x71, 1, 1);
+ return 0;
+ }
++#endif
+
++#ifdef __linux__
+ int io_disable(void)
+ {
+ ioperm(0x70, 0, 1);
+ ioperm(0x71, 0, 1);
+ return 0;
+ }
++#endif
+
+ int get_cmos(int index)
+ {
+ int r;
+
++#ifdef __linux__
+ io_enable();
++#endif
+ outb(0x70, index);
+ r = inb(0x71);
++#ifdef __linux__
+ io_disable();
++#endif
+ return r;
+ }
+
+ int set_cmos(int index, int value)
+ {
++#ifdef __linux__
+ io_enable();
++#endif
+ outb(0x70, index);
+ outb(0x71, value);
+ return 0;
diff --git a/sysutils/libretto-config/files/patch-ad b/sysutils/libretto-config/files/patch-ad
new file mode 100644
index 0000000..9e51d49
--- /dev/null
+++ b/sysutils/libretto-config/files/patch-ad
@@ -0,0 +1,101 @@
+--- libapm-e.man.orig Fri Jun 19 12:02:48 1998
++++ libapm-e.man Thu Nov 26 12:38:56 1998
+@@ -1,73 +1,73 @@
+ .\" Written Tue May 12 19:30:00 1998 by ISHIOKA Takashi
+ .\" (ishioka@ppp01.infopepper.or.jp )
+-.TH libapm l "" "TOSHIBA Libretto only" ""
++.TH libretto-config 8 "" "TOSHIBA Libretto only" ""
+ .SH NAME
+-libapm \- TOSHIBA Libretto BIOS Setup Program
++libretto-config \- TOSHIBA Libretto BIOS Setup Program
+ .SH SYNOPSIS
+
+-.B libapm
+-{\-v,\-\-Version}
+-{\-h,\-\-Help}
++.B libretto-config
++{\-v}
++{\-h}
+
+-.B libapm
+-{\-P,\-\-PowerUp (boot,hibernation)}
+-{\-T,\-\-StandbyTime (0,5,10,15,30,45,60)}
+-{\-a,\-\-AutoOff (disable,10,20,30,40,50,60)}
+-{\-S,\-\-PanelSwitch (disable,enable)}
+-{\-A,\-\-PowerOn (disable,<time>)}
+-{\-L,\-\-LcdPower (0,1,2,3)}
+-{\-V,\-\-Volume (0,1,2,3)}
+-{\-O,\-\-Off (suspend|hibernation)}
++.B libretto-config
++{\-P (boot,hibernation)}
++{\-T (0,5,10,15,30,45,60)}
++{\-a (disable,10,20,30,40,50,60)}
++{\-S (disable,enable)}
++{\-A (disable,<time>)}
++{\-L (0,1,2,3)}
++{\-V (0,1,2,3)}
++{\-O (suspend|hibernation)}
+
+ .SH DESCRIPTION
+-.B libapm
++.B libretto-config
+ configures the setting of Toshiba Libretto.
+ Changes are done immediately and rebooting is not neccesary.
+
+ .SH OPTIONS
+ .TP
+-.B \-P,\-\-PowerUp (boot,hibernation)
++.B \-P (boot,hibernation)
+ sets the Hibernation function.
+ If hibernation is specified, the hibernation function is enabled.
+ If boot is specified, it is disabled.
+ .TP
+-.B \-T,\-\-StandbyTime (0,5,10,15,30,45,60)
++.B \-T (0,5,10,15,30,45,60)
+ sets the Standby time.
+ If the Stanby time is specified, the power is not cut after hibernation
+ for that time in order to resume quickly from hibernation.
+ You can select the time from 0, 5, 10, 15, 30, 45, 60 minutes.
+ This function is valid if the hibernation function is enabled.
+ .TP
+-.B \-a,\-\-AutoOff (disable,10,20,30,40,50,60)
++.B \-a (disable,10,20,30,40,50,60)
+ sets the time to the Auto Power Off.
+ You can select the time from disable, 10, 20, 30, 40, 50, 60 minutes.
+ This function is valid if the hibernation function is enabled.
+ .TP
+-.B \-S,\-\-PanelSwitch (disable,enable)
++.B \-S (disable,enable)
+ sets the Panel Switch funtion. If enabled, hibernation is done by
+ closing the panel and vice versa.
+ This function is valid if the hibernation function is enabled.
+ .TP
+-.B \-A,\-\-PowerOn (disable,<time>)
++.B \-A (disable,<time>)
+ sets the Power On timer.
+ The format of the <time> is hh:mm. If time is specified, power is
+ automatically turned on at the time.
+ .TP
+-.B \-L,\-\-LcdPower (0,1,2,3)
++.B \-L (0,1,2,3)
+ sets the brightness of the LCD.
+ 0 is the darkest and 3 is the brightest.
+ .TP
+-.B \-V,\-\-Volume (0,1,2,3)
++.B \-V (0,1,2,3)
+ sets the volume of beep sound.
+ 0 is off, 1 is minimum and 3 is maximum.
+ .TP
+-.B \-O,\-\-Off (suspend|hibernation)
++.B \-O (suspend|hibernation)
+ sets the suspend/hibernation mode. (100CT Only)
+ .TP
+-.B \-v,\-\-Version
++.B \-v
+ displays the version of this program.
+ .TP
+-.B \-h,\-\-Help
++.B \-h
+ displays the simple usage.
+
+ .SH BUGS
diff --git a/sysutils/libretto-config/files/patch-ae b/sysutils/libretto-config/files/patch-ae
new file mode 100644
index 0000000..1fb53e4
--- /dev/null
+++ b/sysutils/libretto-config/files/patch-ae
@@ -0,0 +1,110 @@
+--- libapm-j.man.orig Thu Jun 4 13:16:43 1998
++++ libapm-j.man Thu Nov 26 12:40:28 1998
+@@ -1,38 +1,38 @@
+ .\" Written Tue May 12 19:30:00 1998 by ISHIOKA Takashi
+ .\" Changes Thu Jun 3 12:10:28 1998
+ .\" (ishioka@ppp01.infopepper.or.jp )
+-.TH libapm l "" "TOSHIBA Libretto only" ""
++.TH libretto-config 8 "" "TOSHIBA Libretto only" ""
+ .SH 名前
+-libapm \- 東芝Librettoの電源管理プログラム
++libretto-config \- 東芝Librettoの電源管理プログラム
+ .SH 書式
+
+-.B libapm
+-{\-v,\-\-Version}
+-{\-h,\-\-Help}
++.B libretto-config
++{\-v}
++{\-h}
+
+-.B libapm
+-{\-P,\-\-PowerUp (boot,hibernation)}
+-{\-T,\-\-StandbyTime (0,5,10,15,30,45,60,unlimit)}
+-{\-a,\-\-AutoOff (disable,10,20,30,40,50,60)}
+-{\-S,\-\-PanelSwitch (disable,enable)}
+-{\-A,\-\-AlarmOn (disable,<time>)}
+-{\-L,\-\-LcdPower (0,1,2,3)}
+-{\-V,\-\-Volume (0,1,2,3)}
+-{\-O,\-\-Off (suspend|hibernation)}
++.B libretto-config
++{\-P (boot,hibernation)}
++{\-T (0,5,10,15,30,45,60,unlimit)}
++{\-a (disable,10,20,30,40,50,60)}
++{\-S (disable,enable)}
++{\-A (disable,<time>)}
++{\-L (0,1,2,3)}
++{\-V (0,1,2,3)}
++{\-O (suspend|hibernation)}
+
+ .SH 説明
+-.B libapm
++.B libretto-config
+ は東芝Libretto のシステム設定を変更します。
+ 変更は即座に反映されリブートの必要はありません。
+
+ .SH オプション
+ .TP
+-.B \-P,\-\-PowerUp (boot,hibernation)
++.B \-P (boot,hibernation)
+ は ハイバネーション機能を設定します。
+ hibernationを指定するとハイバネーション機能が有効になり、
+ bootを指定するとそれが無効になります。
+ .TP
+-.B \-T,\-\-StandbyTime (0,5,10,15,30,45,60,unlimit)
++.B \-T (0,5,10,15,30,45,60,unlimit)
+ は、スタンバイ時間(単位は分)を設定します。
+ スタンバイ時間とは、サスペンドによってハードディスクへの保存処理を
+ 終了した後、完全に電源を切るまでの時間です。
+@@ -40,43 +40,43 @@
+ unlimit を指定した場合は、完全に電源を切らなくなります。
+ この機能は、ハイバネーション機能が有効な場合のみ動作します。
+ .TP
+-.B \-a,\-\-AutoOff (disable,10,20,30,40,50,60)
++.B \-a (disable,10,20,30,40,50,60)
+ システム自動オフ時間(単位は分)を設定します。
+ 指定できる時間は disable,10,20,30,40,50,60 です.
+ この機能は、ハイバネーション機能が有効な場合のみ動作します。
+ .TP
+-.B \-S,\-\-PanelSwitch (disable,enable)
++.B \-S (disable,enable)
+ は、パネルを閉じたときにハイバネーションし、開いたときにレジュームする
+ パネルスイッチの機能を設定します。
+ enable を指定するとパネルスイッチの機能が有効になり、
+ disable を指定するとその機能は無効になります。
+ この機能はハイバネーション機能が有効な場合のみ動作します。
+ .TP
+-.B \-A,\-\-AlarmOn (disable,<time>)
++.B \-A (disable,<time>)
+ は、タイマオン機能を設定します。
+ <time> として hh:mm の形で時刻を与えると、その時刻に自動的に電源が入り
+ ます。disable を指定するとその機能が無効になります。
+ .TP
+-.B \-L,\-\-LcdPower (0,1,2,3)
++.B \-L (0,1,2,3)
+ は、LCD の輝度を設定します。
+ 0,1,2,3 の値が指定できます。
+ 0 が最も暗く、数字が大きくなるに従い、
+ より明るくなります。
+ .TP
+-.B \-V,\-\-Volume (0,1,2,3)
++.B \-V (0,1,2,3)
+ は、ビープ音の設定をします。
+ 0,1,2,3 の値が指定できます。
+ 0でオフ、1が最も小さな音で、数字が大きくなるに従い、
+ より大きな音になります。
+ .TP
+-.B \-O,\-\-Off (suspend|hibernation)
++.B \-O (suspend|hibernation)
+ 電源を切るときに suspend状態にするか、ハイバネーション機能を使うかを
+ 設定します。このオプションは Libretto100以降の機種のみで有効です。
+ .TP
+-.B \-v,\-\-Version
++.B \-v
+ バージョンを表示して終了します。
+ .TP
+-.B \-h,\-\-Help
++.B \-h
+ 簡単なヘルプを表示して終了します。
+
+ .SH バグ
diff --git a/sysutils/libretto-config/pkg-comment b/sysutils/libretto-config/pkg-comment
new file mode 100644
index 0000000..69b8ffa
--- /dev/null
+++ b/sysutils/libretto-config/pkg-comment
@@ -0,0 +1 @@
+libretto-config - Libretto BIOS Setting Program
diff --git a/sysutils/libretto-config/pkg-descr b/sysutils/libretto-config/pkg-descr
new file mode 100644
index 0000000..17dae0c
--- /dev/null
+++ b/sysutils/libretto-config/pkg-descr
@@ -0,0 +1,26 @@
+libretto-config - Libretto BIOS Setting Program
+
+ The `libretto-config' is a utility program to configure the BIOS
+setting of the mini notebook computer, Toshiba Libretto. Changes to
+the setting are immediately done, so rebooting is not necessary.
+ I don't know whether these programs work on any other machines but
+Libretto. In case of Toshiba's notebook machines, some function may
+work.
+
+*** Disclaimer *****************************************************
+ The information used to write these programs was obtained by
+analyzing Libretto individually, not provided by Toshiba. Therefore,
+they might contain fatal bugs and might cause damages to your
+Libretto. You can use them freely but the authors are not
+responsible for the programs. Redistribution of the programs are not
+restricted, but you must attach this caution and the source.
+********************************************************************
+
+ The original program were written by Mr. Iizuka
+(PXN02133@niftyserve.or.jp), which rewrite the CMOS setting directly.
+Mr. Nomura (GBB00111@niftyserve.or.jp) have extended the program to
+support SMI and BIOS calling. Thanks.
+ I, Ishioka, combined programs to the package. If you have any troubles,
+bug reports, or requests, please notify me.
+
+--- Porting by shige@kuis.kyoto-u.ac.jp
diff --git a/sysutils/libretto-config/pkg-plist b/sysutils/libretto-config/pkg-plist
new file mode 100644
index 0000000..0391c41
--- /dev/null
+++ b/sysutils/libretto-config/pkg-plist
@@ -0,0 +1,7 @@
+sbin/libretto-config
+share/doc/libretto-config/README.1st
+share/doc/libretto-config/APM-EXBIOS.txt
+share/doc/libretto-config/ja/README.1st
+share/doc/libretto-config/ja/APM-EXBIOS.txt
+@dirrm share/doc/libretto-config/ja
+@dirrm share/doc/libretto-config
OpenPOWER on IntegriCloud