[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[plamo:24488] Re: Toshiba 300CDS
-
From:早間義博
-
Date:Mon, 10 Jan 2005 08:09:19 +0900 (JST)
- Subject: [plamo:24488] Re: Toshiba 300CDS
- From: 早間義博<yossi@xxxxxxxxxxxxxx>
- Date: Mon, 10 Jan 2005 08:09:11 +0900 (JST)
おはようございます、早間です。
From: KOJIMA Mitsuhiro <kojima@linet.gr.jp>
Subject: [plamo:24482] Re: Toshiba 300CDS
Date: Sun, 09 Jan 2005 21:15:31 +0900 (JST)
Message-ID: <20050109.211531.115911154.kojima@linet.gr.jp>
>
> こじま@通りがかり,です.
>
近くをお通りの節はお立ち寄り下さい。
> >
> > mii-diag.c をコンパイルしようとしたのですが、私の力では出来ません。
> > 複数行にまたがる常数というのは使った事がありません。
> > $ cc mii-diag.c
> > mii-diag.c:40:1: " 文字での終端を欠いています
> > mii-diag.c:42: error: 構文解析エラー before "This"
> > mii-diag.c:53: error: stray '\' in program
> > mii-diag.c:53:30: " 文字での終端を欠いています
> > 云々とエラーが続きます。
> >
>
> これは GCC の仕様が変って,ダブルクォート内の文字列を \ で連結できなく
> なったのが原因じゃないかな?
>
> 単に \ と改行を削って,文字列を継いでやればコンパイルは通ったように思ふ.
>
ソースコードを見たところ
"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>.
This program configures and monitors the transceiver management registers
と \ が無かったので、このコメントの行末に " で閉じられる所まで \
を付けたところ、コンパイル出来ました。
ただ、この部分は help (-h) のコメントで、
# ./mii-diag -h
を実行すると help のメッセージが無改行で表示され、読みにくいです。
行末を \ でなく \n\ を付ける事にしました。
また、実行ファイル名を指定しないでコンパイルするとライブラリエラーで実行
出来ません。
$ cc mii-diag.c
mii-diag.c:614: 警告: weak declaration of `monitor_mii' after first use results in unspecified behavior
$ a.out
a.out: can't load library 'libXaw.so.6'
コンパイル時に実行ファイル名を指定すると実行できます。
$ cc -o mii-diag mii-diag.c
mii-diag.c:614: 警告: weak declaration of `monitor_mii' after first use results in unspecified behavior
$ ./mii-diag
Using the default interface 'eth0'.
SIOCGMIIPHY on eth0 failed: Operation not supported
奇妙な経験です。
実行結果は下記の通りです。なお TX-CBD(RTL-8139)使用中です。
# ./mii-diag
Using the default interface 'eth0'.
Basic registers of MII PHY #32: 1100 782d 0000 0000 01e1 41e1 0001 0000.
The autonegotiated capability is 01e0.
The autonegotiated media type is 100baseTx-FD.
Basic mode control register 0x1100: Auto-negotiation enabled.
You have link beat, and everything is working OK.
Your link partner advertised 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT.
End of basic transceiver information.
TX-CBD(RTL-8139) を外して、8139too crc32 mii を外すと下記の通りです。
# ./mii-diag
Using the default interface 'eth0'.
SIOCGMIIPHY on eth0 failed: No such device
TX-CBD(RTL-8139) を挿しても下記の通りです。
# ./mii-diag
Using the default interface 'eth0'.
SIOCGMIIPHY on eth0 failed: No such device
#modprobe 8139too を実行すると当然の事ながら最初の表示がでます。
この結果をどのように解釈すれば良いのでしょう。
-- 早間 yossi@yedo.src.co.jp
- Follow-Ups
-
- [plamo:24549] Re: Toshiba 300CDS, 名倉昭一
- References
-
- [plamo:24478] Re: Toshiba 300CDS, 名倉昭一
- [plamo:24481] Re: Toshiba 300CDS, 早間義博
- [plamo:24482] Re: Toshiba 300CDS, KOJIMA Mitsuhiro
[検索ページ]
[メール一覧]
Plamo ML 公開システム