Units API.

See the Weblate's Web API documentation for detailed description of the API.

GET /api/units/157269/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api",
    "source": [
        "The ioctl interface is quite fragile due to its generality. We have to bear in mind that devices differ between <trademark class=\"registered\">Linux</trademark> and FreeBSD so some care must be applied to do ioctl emulation work right. The ioctl handling is implemented in <filename>linux_ioctl.c</filename>, where <function>linux_ioctl</function> function is defined. This function simply iterates over sets of ioctl handlers to find a handler that implements a given command. The ioctl syscall has three parameters, the file descriptor, command and an argument. The command is a 16-bit number, which in theory is divided into high 8 bits determining class of the ioctl command and low 8 bits, which are the actual command within the given set. The emulation takes advantage of this division. We implement handlers for each set, like <function>sound_handler</function> or <function>disk_handler</function>. Each handler has a maximum command and a minimum command defined, which is used for determining what handler is used. There are slight problems with this approach because <trademark class=\"registered\">Linux</trademark> does not use the set division consistently so sometimes ioctls for a different set are inside a set they should not belong to (SCSI generic ioctls inside cdrom set, etc.). FreeBSD currently does not implement many <trademark class=\"registered\">Linux</trademark> ioctls (compared to NetBSD, for example) but the plan is to port those from NetBSD. The trend is to use <trademark class=\"registered\">Linux</trademark> ioctls even in the native FreeBSD drivers because of the easy porting of applications."
    ],
    "previous_source": "",
    "target": [
        "The ioctl interface is quite fragile due to its generality. We have to bear in mind that devices differ between <trademark class=\"registered\">Linux</trademark> and FreeBSD so some care must be applied to do ioctl emulation work right. The ioctl handling is implemented in <filename>linux_ioctl.c</filename>, where <function>linux_ioctl</function> function is defined. This function simply iterates over sets of ioctl handlers to find a handler that implements a given command. The ioctl syscall has three parameters, the file descriptor, command and an argument. The command is a 16-bit number, which in theory is divided into high 8 bits determining class of the ioctl command and low 8 bits, which are the actual command within the given set. The emulation takes advantage of this division. We implement handlers for each set, like <function>sound_handler</function> or <function>disk_handler</function>. Each handler has a maximum command and a minimum command defined, which is used for determining what handler is used. There are slight problems with this approach because <trademark class=\"registered\">Linux</trademark> does not use the set division consistently so sometimes ioctls for a different set are inside a set they should not belong to (SCSI generic ioctls inside cdrom set, etc.). FreeBSD currently does not implement many <trademark class=\"registered\">Linux</trademark> ioctls (compared to NetBSD, for example) but the plan is to port those from NetBSD. The trend is to use <trademark class=\"registered\">Linux</trademark> ioctls even in the native FreeBSD drivers because of the easy porting of applications."
    ],
    "id_hash": 8688480580634056386,
    "content_hash": 8688480580634056386,
    "location": "article.translate.xml:2392",
    "context": "",
    "note": "(itstool) path: sect3/para",
    "flags": "",
    "labels": [],
    "state": 100,
    "fuzzy": false,
    "translated": true,
    "approved": false,
    "position": 356,
    "has_suggestion": false,
    "has_comment": false,
    "has_failing_check": false,
    "num_words": 234,
    "source_unit": "https://translate-dev.freebsd.org/api/units/157269/?format=api",
    "priority": 100,
    "id": 157269,
    "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=f893af0df69296c2",
    "url": "https://translate-dev.freebsd.org/api/units/157269/?format=api",
    "explanation": "",
    "extra_flags": "",
    "pending": false,
    "timestamp": "2020-04-18T18:14:55.402668Z"
}