Units
Translation components API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/units/?format=api
https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/units/?format=api&page=2", "previous": null, "results": [ { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Chapter 9. Writing FreeBSD Device Drivers" ], "previous_source": "", "target": [ "" ], "id_hash": -2703317054944986056, "content_hash": -2703317054944986056, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:1", "context": "", "note": "type: YAML Front Matter: title", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 2, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/1136034/?format=api", "priority": 100, "id": 1136578, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=5a7be37618bfbc38", "url": "https://translate-dev.freebsd.org/api/units/1136578/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.116213Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Writing FreeBSD Device Drivers" ], "previous_source": "", "target": [ "编写 FreeBSD 设备驱动程序" ], "id_hash": 8486075533268508668, "content_hash": 8486075533268508668, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:1, documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:13", "context": "", "note": "type: Title =", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 1, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1136036/?format=api", "priority": 100, "id": 1136579, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=f5c498bc819a5ffc", "url": "https://translate-dev.freebsd.org/api/units/1136579/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.123754Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Introduction" ], "previous_source": "", "target": [ "介绍" ], "id_hash": 5330140601372690748, "content_hash": 5330140601372690748, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:51", "context": "", "note": "type: Title ==", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 3, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1136038/?format=api", "priority": 100, "id": 1136580, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=c9f876a2fbb4c93c", "url": "https://translate-dev.freebsd.org/api/units/1136580/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.130372Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "This chapter provides a brief introduction to writing device drivers for FreeBSD. A device in this context is a term used mostly for hardware-related stuff that belongs to the system, like disks, printers, or a graphics display with its keyboard. A device driver is the software component of the operating system that controls a specific device. There are also so-called pseudo-devices where a device driver emulates the behavior of a device in software without any particular underlying hardware. Device drivers can be compiled into the system statically or loaded on demand through the dynamic kernel linker facility `kld'." ], "previous_source": "", "target": [ "本章简要介绍了如何为FreeBSD编写设备驱动程序。术语设备在这儿的上下文中多用于指代系统中硬件相关的东西,如磁盘,打印机,图形显式器及其键盘。设备驱动程序是操作系统中用于控制特定设备的软件组件。也有所谓的伪设备,即设备驱动程序用软件模拟设备的行为,而没有特定的底层硬件。设备驱动程序可以被静态地编译进系统,或者通过动态内核链接工具‘kld’在需要时加载。" ], "id_hash": 9075963108666372159, "content_hash": 9075963108666372159, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:54", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 4, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 98, "source_unit": "https://translate-dev.freebsd.org/api/units/1136040/?format=api", "priority": 100, "id": 1136581, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=fdf44c5c5e9bf03f", "url": "https://translate-dev.freebsd.org/api/units/1136581/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.176061Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Most devices in a UNIX(R)-like operating system are accessed through device-nodes, sometimes also called special files. These files are usually located under the directory [.filename]#/dev# in the filesystem hierarchy." ], "previous_source": "", "target": [ "" ], "id_hash": -6100535167797885519, "content_hash": -6100535167797885519, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:56", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 5, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 29, "source_unit": "https://translate-dev.freebsd.org/api/units/1136042/?format=api", "priority": 100, "id": 1136582, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=2b568b963fa105b1", "url": "https://translate-dev.freebsd.org/api/units/1136582/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.183291Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Device drivers can roughly be broken down into two categories; character and network device drivers." ], "previous_source": "", "target": [ "设备驱动程序可以粗略地分为两类,字符和网络设备驱动程序。" ], "id_hash": 2188068204069803364, "content_hash": 2188068204069803364, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:58", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 6, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 15, "source_unit": "https://translate-dev.freebsd.org/api/units/1136044/?format=api", "priority": 100, "id": 1136583, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=9e5d94704fe85564", "url": "https://translate-dev.freebsd.org/api/units/1136583/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.190009Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Dynamic Kernel Linker Facility - KLD" ], "previous_source": "", "target": [ "内核动态链接工具 - KLD" ], "id_hash": 7674421623761830195, "content_hash": 7674421623761830195, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:60", "context": "", "note": "type: Title ==", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 7, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/1136046/?format=api", "priority": 100, "id": 1136584, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=ea8105ce54e68133", "url": "https://translate-dev.freebsd.org/api/units/1136584/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.196707Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "The kld interface allows system administrators to dynamically add and remove functionality from a running system. This allows device driver writers to load their new changes into a running kernel without constantly rebooting to test changes." ], "previous_source": "", "target": [ "kld 接口允许系统管理员从运行的系统中动态地添加和删除功能。这允许设备驱动程序的编写者将他们的新改动加载到运行的内核中,而不用为了测试新改动而频繁地重启。" ], "id_hash": 6740171895959367125, "content_hash": 6740171895959367125, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:63", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 8, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 36, "source_unit": "https://translate-dev.freebsd.org/api/units/1136048/?format=api", "priority": 100, "id": 1136585, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=dd89e6a0dfbaadd5", "url": "https://translate-dev.freebsd.org/api/units/1136585/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.203065Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "The kld interface is used through:" ], "previous_source": "", "target": [ "kld 接口通过下面的特权命令使用:" ], "id_hash": 2184054385523465259, "content_hash": 2184054385523465259, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:65", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 9, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/1136050/?format=api", "priority": 100, "id": 1136586, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=9e4f51e45b429c2b", "url": "https://translate-dev.freebsd.org/api/units/1136586/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.209932Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "`kldload` - loads a new kernel module" ], "previous_source": "", "target": [ "" ], "id_hash": -3453289121984458492, "content_hash": -3453289121984458492, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:67", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 10, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/1136052/?format=api", "priority": 100, "id": 1136587, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=501373d701655104", "url": "https://translate-dev.freebsd.org/api/units/1136587/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.215918Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "`kldunload` - unloads a kernel module" ], "previous_source": "", "target": [ "" ], "id_hash": -8302754555814929363, "content_hash": -8302754555814929363, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:68", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 11, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/1136054/?format=api", "priority": 100, "id": 1136588, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=0cc6b0b8ab651c2d", "url": "https://translate-dev.freebsd.org/api/units/1136588/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.221816Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "`kldstat` - lists loaded modules" ], "previous_source": "", "target": [ "" ], "id_hash": 3587990033655218090, "content_hash": 3587990033655218090, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:69", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 12, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 5, "source_unit": "https://translate-dev.freebsd.org/api/units/1136056/?format=api", "priority": 100, "id": 1136589, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=b1cb19ecf5a93faa", "url": "https://translate-dev.freebsd.org/api/units/1136589/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.227367Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Skeleton Layout of a kernel module" ], "previous_source": "", "target": [ "内核模块的程序框架" ], "id_hash": -6768464181530108505, "content_hash": -6768464181530108505, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:71", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 13, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/1136058/?format=api", "priority": 100, "id": 1136590, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=221195b010f15da7", "url": "https://translate-dev.freebsd.org/api/units/1136590/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.233536Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/*\n * KLD Skeleton\n * Inspired by Andrew Reiter's Daemonnews article\n */\n" ], "previous_source": "", "target": [ "" ], "id_hash": 4174900884371496136, "content_hash": 4174900884371496136, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:78", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 14, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/1136060/?format=api", "priority": 100, "id": 1136591, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=b9f03a3c196d5cc8", "url": "https://translate-dev.freebsd.org/api/units/1136591/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.240330Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/*\n * Load handler that deals with the loading and unloading of a KLD.\n */\n" ], "previous_source": "", "target": [ "" ], "id_hash": 5264198659201008444, "content_hash": 5264198659201008444, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:89", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 16, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 15, "source_unit": "https://translate-dev.freebsd.org/api/units/1136064/?format=api", "priority": 100, "id": 1136593, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=c90e30ca24c3833c", "url": "https://translate-dev.freebsd.org/api/units/1136593/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.280908Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "static int\nskel_loader(struct module *m, int what, void *arg)\n{\n int err = 0;\n" ], "previous_source": "", "target": [ "" ], "id_hash": 8894751195003712946, "content_hash": 8894751195003712946, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:94", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 17, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 14, "source_unit": "https://translate-dev.freebsd.org/api/units/1136066/?format=api", "priority": 100, "id": 1136594, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=fb708115dfad75b2", "url": "https://translate-dev.freebsd.org/api/units/1136594/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.286482Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ " switch (what) {\n case MOD_LOAD: /* kldload */\n uprintf(\"Skeleton KLD loaded.\\n\");\n break;\n case MOD_UNLOAD:\n uprintf(\"Skeleton KLD unloaded.\\n\");\n break;\n default:\n err = EOPNOTSUPP;\n break;\n }\n return(err);\n}\n" ], "previous_source": "", "target": [ "" ], "id_hash": -8352390002371792887, "content_hash": -8352390002371792887, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:108", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 18, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 26, "source_unit": "https://translate-dev.freebsd.org/api/units/1136068/?format=api", "priority": 100, "id": 1136595, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=0c16598bb31af009", "url": "https://translate-dev.freebsd.org/api/units/1136595/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.292377Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/* Declare this module to the rest of the kernel */\n" ], "previous_source": "", "target": [ "" ], "id_hash": -7009921927751979872, "content_hash": -7009921927751979872, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:110", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 19, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/1136070/?format=api", "priority": 100, "id": 1136596, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=1eb7c125991f2ca0", "url": "https://translate-dev.freebsd.org/api/units/1136596/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.298609Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "static moduledata_t skel_mod = {\n \"skel\",\n skel_loader,\n NULL\n};\n" ], "previous_source": "", "target": [ "" ], "id_hash": 2411056455918524225, "content_hash": 2411056455918524225, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:116", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 20, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 9, "source_unit": "https://translate-dev.freebsd.org/api/units/1136072/?format=api", "priority": 100, "id": 1136597, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=a175cb12846f9741", "url": "https://translate-dev.freebsd.org/api/units/1136597/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.305704Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "DECLARE_MODULE(skeleton, skel_mod, SI_SUB_KLD, SI_ORDER_ANY);\n" ], "previous_source": "", "target": [ "" ], "id_hash": -2582663552962118802, "content_hash": -2582663552962118802, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:118", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 21, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1136074/?format=api", "priority": 100, "id": 1136598, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=5c28892e9f583b6e", "url": "https://translate-dev.freebsd.org/api/units/1136598/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.312362Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Makefile" ], "previous_source": "", "target": [ "Makefile" ], "id_hash": -4026927537722843054, "content_hash": -4026927537722843054, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:120", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 22, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1136076/?format=api", "priority": 100, "id": 1136599, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=481d7abd71caa052", "url": "https://translate-dev.freebsd.org/api/units/1136599/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.318111Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "FreeBSD provides a system makefile to simplify compiling a kernel module." ], "previous_source": "", "target": [ "FreeBSD提供了一个makefile包含文件,利用它你可以快速地编译你附加到内核的东西。" ], "id_hash": 4065885713308074158, "content_hash": 4065885713308074158, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:123", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 23, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/1136078/?format=api", "priority": 100, "id": 1136600, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=b86ced83a71040ae", "url": "https://translate-dev.freebsd.org/api/units/1136600/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.323363Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "SRCS=skeleton.c\nKMOD=skeleton\n" ], "previous_source": "", "target": [ "" ], "id_hash": -7203815899468211751, "content_hash": -7203815899468211751, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:128", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 24, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1136080/?format=api", "priority": 100, "id": 1136601, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=1c06e79b5ce2d9d9", "url": "https://translate-dev.freebsd.org/api/units/1136601/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.329347Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ ".include <bsd.kmod.mk>\n" ], "previous_source": "", "target": [ "" ], "id_hash": 8975336119357712390, "content_hash": 8975336119357712390, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:130", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 25, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1136082/?format=api", "priority": 100, "id": 1136602, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=fc8ecca5ae0ca806", "url": "https://translate-dev.freebsd.org/api/units/1136602/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.335669Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Running `make` with this makefile will create a file [.filename]#skeleton.ko# that can be loaded into the kernel by typing:" ], "previous_source": "", "target": [ "" ], "id_hash": 8349306993799774076, "content_hash": 8349306993799774076, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:133", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 26, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 19, "source_unit": "https://translate-dev.freebsd.org/api/units/1136084/?format=api", "priority": 100, "id": 1136603, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=f3deb2796e1ebf7c", "url": "https://translate-dev.freebsd.org/api/units/1136603/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.341746Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "# kldload -v ./skeleton.ko\n" ], "previous_source": "", "target": [ "" ], "id_hash": -3661879904106564154, "content_hash": -3661879904106564154, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:137", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 27, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1136086/?format=api", "priority": 100, "id": 1136604, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=4d2e63a0f19635c6", "url": "https://translate-dev.freebsd.org/api/units/1136604/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.376723Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Character Devices" ], "previous_source": "", "target": [ "字符设备" ], "id_hash": -4964220595905380725, "content_hash": -4964220595905380725, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:140", "context": "", "note": "type: Title ==", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 28, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1136088/?format=api", "priority": 100, "id": 1136605, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=3b1b8bab6a61be8b", "url": "https://translate-dev.freebsd.org/api/units/1136605/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.385060Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "A character device driver is one that transfers data directly to and from a user process. This is the most common type of device driver and there are plenty of simple examples in the source tree." ], "previous_source": "", "target": [ "字符设备驱动程序直接从用户进程传输数据,或传输数据到用户进程。这是最普通的一类设备驱动程序,源码树中有大量的简单例子。" ], "id_hash": 1710985152252052202, "content_hash": 1710985152252052202, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:143", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 29, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 36, "source_unit": "https://translate-dev.freebsd.org/api/units/1136090/?format=api", "priority": 100, "id": 1136606, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=97bea3ee47f382ea", "url": "https://translate-dev.freebsd.org/api/units/1136606/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.390525Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "This simple example pseudo-device remembers whatever values are written to it and can then echo them back when read." ], "previous_source": "", "target": [ "这个简单的伪设备例子会记住你写给它的任何值,并且当你读取它的时候会将这些值返回给你。" ], "id_hash": 7064233888484736796, "content_hash": 7064233888484736796, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:145", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 30, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 19, "source_unit": "https://translate-dev.freebsd.org/api/units/1136092/?format=api", "priority": 100, "id": 1136607, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=e209334b2d68bf1c", "url": "https://translate-dev.freebsd.org/api/units/1136607/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.396761Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "Example of a Sample Echo Pseudo-Device Driver for FreeBSD 10.X - 12.X" ], "previous_source": "", "target": [ "" ], "id_hash": 9144301548006342219, "content_hash": 9144301548006342219, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:146", "context": "", "note": "type: Block title", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 31, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/1136094/?format=api", "priority": 100, "id": 1136608, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=fee715cf2ff8fe4b", "url": "https://translate-dev.freebsd.org/api/units/1136608/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.405596Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/*\n * Simple Echo pseudo-device KLD\n *\n * Murray Stokely\n * Søren (Xride) Straarup\n * Eitan Adler\n */\n" ], "previous_source": "", "target": [ "" ], "id_hash": 9217523059148232746, "content_hash": 9217523059148232746, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:158", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 32, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 18, "source_unit": "https://translate-dev.freebsd.org/api/units/1136096/?format=api", "priority": 100, "id": 1136609, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=ffeb3862c180982a", "url": "https://translate-dev.freebsd.org/api/units/1136609/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.412293Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "#define BUFFERSIZE 255\n" ], "previous_source": "", "target": [ "" ], "id_hash": -6496193265239849892, "content_hash": -6496193265239849892, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:169", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 34, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/1136100/?format=api", "priority": 100, "id": 1136611, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=25d8e2a4c118045c", "url": "https://translate-dev.freebsd.org/api/units/1136611/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.428195Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/* Function prototypes */\nstatic d_open_t echo_open;\nstatic d_close_t echo_close;\nstatic d_read_t echo_read;\nstatic d_write_t echo_write;\n" ], "previous_source": "", "target": [ "" ], "id_hash": -2554704346690482877, "content_hash": -2554704346690482877, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:175", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 35, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 16, "source_unit": "https://translate-dev.freebsd.org/api/units/1136102/?format=api", "priority": 100, "id": 1136612, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=5c8bddee9d5e0d43", "url": "https://translate-dev.freebsd.org/api/units/1136612/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.438157Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/* Character device entry points */\nstatic struct cdevsw echo_cdevsw = {\n\t.d_version = D_VERSION,\n\t.d_open = echo_open,\n\t.d_close = echo_close,\n\t.d_read = echo_read,\n\t.d_write = echo_write,\n\t.d_name = \"echo\",\n};\n" ], "previous_source": "", "target": [ "" ], "id_hash": -2577642540047567972, "content_hash": -2577642540047567972, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:185", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 36, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 31, "source_unit": "https://translate-dev.freebsd.org/api/units/1136104/?format=api", "priority": 100, "id": 1136613, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=5c3a5fc44a87739c", "url": "https://translate-dev.freebsd.org/api/units/1136613/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.448885Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "struct s_echo {\n\tchar msg[BUFFERSIZE + 1];\n\tint len;\n};\n" ], "previous_source": "", "target": [ "" ], "id_hash": 1441649793368571868, "content_hash": 1441649793368571868, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:190", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 37, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/1136106/?format=api", "priority": 100, "id": 1136614, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=9401c4d9503fbfdc", "url": "https://translate-dev.freebsd.org/api/units/1136614/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.456627Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/* vars */\nstatic struct cdev *echo_dev;\nstatic struct s_echo *echomsg;\n" ], "previous_source": "", "target": [ "" ], "id_hash": -3726371867551551728, "content_hash": -3726371867551551728, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:194", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 38, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/1136108/?format=api", "priority": 100, "id": 1136615, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=4c4944879594af10", "url": "https://translate-dev.freebsd.org/api/units/1136615/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.491256Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "MALLOC_DECLARE(M_ECHOBUF);\nMALLOC_DEFINE(M_ECHOBUF, \"echobuffer\", \"buffer for echo module\");\n" ], "previous_source": "", "target": [ "" ], "id_hash": -2642381109602615962, "content_hash": -2642381109602615962, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:197", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 39, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/1136110/?format=api", "priority": 100, "id": 1136616, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=5b54606178eefd66", "url": "https://translate-dev.freebsd.org/api/units/1136616/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.500250Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/*\n * This function is called by the kld[un]load(2) system calls to\n * determine what actions to take when a module is loaded or unloaded.\n */\nstatic int\necho_loader(struct module *m __unused, int what, void *arg __unused)\n{\n\tint error = 0;\n" ], "previous_source": "", "target": [ "" ], "id_hash": -1622720009541924125, "content_hash": -1622720009541924125, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:206", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 40, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 42, "source_unit": "https://translate-dev.freebsd.org/api/units/1136112/?format=api", "priority": 100, "id": 1136617, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=697af0bfb555cae3", "url": "https://translate-dev.freebsd.org/api/units/1136617/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.509588Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "\tswitch (what) {\n\tcase MOD_LOAD: /* kldload */\n\t\terror = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK,\n\t\t &echo_dev,\n\t\t &echo_cdevsw,\n\t\t 0,\n\t\t UID_ROOT,\n\t\t GID_WHEEL,\n\t\t 0600,\n\t\t \"echo\");\n\t\tif (error != 0)\n\t\t\tbreak;\n" ], "previous_source": "", "target": [ "" ], "id_hash": 1122053842250901903, "content_hash": 1122053842250901903, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:219", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 41, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 25, "source_unit": "https://translate-dev.freebsd.org/api/units/1136114/?format=api", "priority": 100, "id": 1136618, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=8f9256064e3a298f", "url": "https://translate-dev.freebsd.org/api/units/1136618/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.517825Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "\t\techomsg = malloc(sizeof(*echomsg), M_ECHOBUF, M_WAITOK |\n\t\t M_ZERO);\n\t\tprintf(\"Echo device loaded.\\n\");\n\t\tbreak;\n\tcase MOD_UNLOAD:\n\t\tdestroy_dev(echo_dev);\n\t\tfree(echomsg, M_ECHOBUF);\n\t\tprintf(\"Echo device unloaded.\\n\");\n\t\tbreak;\n\tdefault:\n\t\terror = EOPNOTSUPP;\n\t\tbreak;\n\t}\n\treturn (error);\n}\n" ], "previous_source": "", "target": [ "" ], "id_hash": 4708694033005223695, "content_hash": 4708694033005223695, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:235", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 42, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 29, "source_unit": "https://translate-dev.freebsd.org/api/units/1136116/?format=api", "priority": 100, "id": 1136619, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=c158a44679471f0f", "url": "https://translate-dev.freebsd.org/api/units/1136619/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.531561Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "static int\necho_open(struct cdev *dev __unused, int oflags __unused, int devtype __unused,\n struct thread *td __unused)\n{\n\tint error = 0;\n" ], "previous_source": "", "target": [ "" ], "id_hash": 2578992003593899756, "content_hash": 2578992003593899756, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:241", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 43, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 21, "source_unit": "https://translate-dev.freebsd.org/api/units/1136118/?format=api", "priority": 100, "id": 1136620, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=a3ca6b902cc98eec", "url": "https://translate-dev.freebsd.org/api/units/1136620/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.539747Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "\tuprintf(\"Opened device \\\"echo\\\" successfully.\\n\");\n\treturn (error);\n}\n" ], "previous_source": "", "target": [ "" ], "id_hash": -6907858020286882886, "content_hash": -6907858020286882886, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:245", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 44, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/1136120/?format=api", "priority": 100, "id": 1136621, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=20225bbaddf79bba", "url": "https://translate-dev.freebsd.org/api/units/1136621/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.546193Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "static int\necho_close(struct cdev *dev __unused, int fflag __unused, int devtype __unused,\n struct thread *td __unused)\n{\n" ], "previous_source": "", "target": [ "" ], "id_hash": -5115587816924568140, "content_hash": -5115587816924568140, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:250", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 45, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 17, "source_unit": "https://translate-dev.freebsd.org/api/units/1136122/?format=api", "priority": 100, "id": 1136622, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=3901c7fbeae525b4", "url": "https://translate-dev.freebsd.org/api/units/1136622/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.551779Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "\tuprintf(\"Closing device \\\"echo\\\".\\n\");\n\treturn (0);\n}\n" ], "previous_source": "", "target": [ "" ], "id_hash": 4453322758919858179, "content_hash": 4453322758919858179, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:254", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 46, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/1136124/?format=api", "priority": 100, "id": 1136623, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=bdcd61745b94a803", "url": "https://translate-dev.freebsd.org/api/units/1136623/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.558385Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/*\n * The read function just takes the buf that was saved via\n * echo_write() and returns it to userland for accessing.\n * uio(9)\n */\nstatic int\necho_read(struct cdev *dev __unused, struct uio *uio, int ioflag __unused)\n{\n\tsize_t amt;\n\tint error;\n" ], "previous_source": "", "target": [ "" ], "id_hash": -872242036626685392, "content_hash": -872242036626685392, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:265", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 47, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 42, "source_unit": "https://translate-dev.freebsd.org/api/units/1136126/?format=api", "priority": 100, "id": 1136624, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=73e52c7d30b40230", "url": "https://translate-dev.freebsd.org/api/units/1136624/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.577832Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "\t/*\n\t * How big is this read operation? Either as big as the user wants,\n\t * or as big as the remaining data. Note that the 'len' does not\n\t * include the trailing null character.\n\t */\n\tamt = MIN(uio->uio_resid, uio->uio_offset >= echomsg->len + 1 ? 0 :\n\t echomsg->len + 1 - uio->uio_offset);\n" ], "previous_source": "", "target": [ "" ], "id_hash": 2709165537379200475, "content_hash": 2709165537379200475, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:273", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 48, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 52, "source_unit": "https://translate-dev.freebsd.org/api/units/1136128/?format=api", "priority": 100, "id": 1136625, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=a598e3b3d537addb", "url": "https://translate-dev.freebsd.org/api/units/1136625/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.583991Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "\tif ((error = uiomove(echomsg->msg, amt, uio)) != 0)\n\t\tuprintf(\"uiomove failed!\\n\");\n" ], "previous_source": "", "target": [ "" ], "id_hash": -8185981403895168414, "content_hash": -8185981403895168414, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:276", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 49, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/1136130/?format=api", "priority": 100, "id": 1136626, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=0e658d48cae00262", "url": "https://translate-dev.freebsd.org/api/units/1136626/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.589270Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "\treturn (error);\n}\n" ], "previous_source": "", "target": [ "" ], "id_hash": 3760637992045188828, "content_hash": 3760637992045188828, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:279", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 50, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/1136132/?format=api", "priority": 100, "id": 1136627, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=b43078543cb116dc", "url": "https://translate-dev.freebsd.org/api/units/1136627/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.594254Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "/*\n * echo_write takes in a character string and saves it\n * to buf for later accessing.\n */\nstatic int\necho_write(struct cdev *dev __unused, struct uio *uio, int ioflag __unused)\n{\n\tsize_t amt;\n\tint error;\n" ], "previous_source": "", "target": [ "" ], "id_hash": -6867181188477616930, "content_hash": -6867181188477616930, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:289", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 51, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 35, "source_unit": "https://translate-dev.freebsd.org/api/units/1136134/?format=api", "priority": 100, "id": 1136628, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=20b2df17cc8bfcde", "url": "https://translate-dev.freebsd.org/api/units/1136628/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.599325Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookdriverbasics_index/zh_CN/?format=api", "source": [ "\t/*\n\t * We either write from the beginning or are appending -- do\n\t * not allow random access.\n\t */\n\tif (uio->uio_offset != 0 && (uio->uio_offset != echomsg->len))\n\t\treturn (EINVAL);\n" ], "previous_source": "", "target": [ "" ], "id_hash": -172368651321161343, "content_hash": -172368651321161343, "location": "documentation/content/en/books/arch-handbook/driverbasics/_index.adoc:296", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 52, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 29, "source_unit": "https://translate-dev.freebsd.org/api/units/1136136/?format=api", "priority": 100, "id": 1136629, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookdriverbasics_index/zh_CN/?checksum=7d9b9f9ff796c981", "url": "https://translate-dev.freebsd.org/api/units/1136629/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T13:17:41.613067Z" } ] }{ "count": 68, "next": "