Units API.

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

GET /api/units/157270/?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/es/?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": [
        "La interfaz ioctl es bastante frágil debido a su generalidad. Tenemos que tener en cuenta que los dispositivos difieren entre <trademark class=\"registered\">Linux</trademark> y FreeBSD, por lo que se debe tener cuidado para que la emulación de ioctl funcione correctamente. El manejo de ioctl se implementa en <filename>linux_ioctl.c</filename>, donde <function>linux_ioctl</function> la función está definida. Esta función simplemente itera sobre conjuntos de manejadores ioctl para encontrar un manejador que implemente un comando dado. El syscall ioctl tiene tres parámetros, el descriptor de archivo, el comando y un argumento. El comando es un número de 16 bits, que en teoría se divide en 8 bits altos que determinan la clase del comando ioctl y 8 bits bajos, que son el comando real dentro del conjunto dado. La emulación aprovecha esta división. Implementamos controladores para cada conjunto, como <function>sound_handler</function> o <function>disk_handler</function>.Cada controlador tiene un comando máximo y un comando mínimo definido, que se utiliza para determinar qué controlador se utiliza. Hay leves problemas con este enfoque porque <trademark class=\"registered\">Linux</trademark> no usa la división de conjuntos de manera consistente, por lo que a veces los ioctls de un conjunto diferente están dentro de un conjunto al que no deberían pertenecer (ioctls genéricos SCSI dentro del conjunto cdrom, etc.). FreeBSD actualmente no implementa muchos <trademark class=\"registered\">Linux</trademark>ioctls (en comparación con NetBSD, por ejemplo) pero el plan es portarlos de NetBSD. La tendencia es usar <trademark class=\"registered\">Linux</trademark> ioctls incluso en los controladores nativos de FreeBSD debido a la fácil migración de las aplicaciones."
    ],
    "id_hash": 8688480580634056386,
    "content_hash": 8688480580634056386,
    "location": "article.translate.xml:2392",
    "context": "",
    "note": "(itstool) path: sect3/para",
    "flags": "",
    "labels": [],
    "state": 20,
    "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": 157270,
    "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/es/?checksum=f893af0df69296c2",
    "url": "https://translate-dev.freebsd.org/api/units/157270/?format=api",
    "explanation": "",
    "extra_flags": "",
    "pending": false,
    "timestamp": "2020-04-18T18:14:55.413206Z"
}